Optimal stopping for AStarBi

Rewrote AStarBidirectional to make unidirectional Potentials consistent in the bidirectional case. This includes an outsourcing of the weight approximation to a seperate class in both AStar and AStarBi.