Pathfinding Performance Improvements and More

Stop finding long, complex paths if enough simple paths are found.
Handle the last link in the path more efficiently.
Various cleanups, replacing BOOST_FOREACH with range-based for.

Also, a fairly trivial removal of dead code from SHAMapMissingNode.