Use pairing heap in pathfinding

whee, finally it's working, including the update (aka. decrease_key) operation!