astar: Implement diagonal heuristics.