This is a bi-directional A* search algorithm. It searches from the source toward the distination and at the same time from the destination to the source and terminates whe these to searches meet in the middle. Returns a set of pgr_costResult (seq, id1, id2, cost) rows, that make up a path.