astar: Write another implementation of A* as a learning exercise.