Passes A* autograder

Had to resort to a second visited list like we discussed in order to
avoid issue when certain nodes would get skipped over because the
closed[successor[0]]=[] was unneccesarily adding them.