Fixes AStar algo shortcoming and thereby #887

Some graphs would have the AStar algorithm not select the cheapest path,
specifically if there were multiple paths through the same node.

While doing this fix there were a number of low-hanging optimizations that
were done as well, which resulted in less memory usage and faster
algorithm, measured to roughly 15% performance increase.

This commit also includes a very crude geo data generator this may not be
very realistic, but holds reasonably true to geographic aspects.