This adds an additional constraint onto YenKShortestPaths to consider
the paths' cost as well as the number of paths, enabling search within a
constrained distance.
Previously the code was not removing nodes on the root of the search
path, resulting in searches that could re-enter previously searched
nodes. In addition to this, the logic for making edges was incorrectly
marking both directions for digraphs and only one direction for
undirected graphs.
Finally, the range of nodes to include in the spur-node set was
off-by-one. This is now clarified by including the comment from the wiki
article since the pseudo-code is less clear than the English due to
choice of range indexing convention.