Ability to return paths with diminishing cost from Dijkstra/TraversalAStar

Algorithm object accepts parameter whether or not to retain sufficient
information to be able to, in addition to returning the best path(s),
continue to return paths in order of diminishing cost. Retention requires
more memory and has some performance impact as well, but only if enabled.