Reverts yvarov's astar rewrite from 16/5

- Maintains the other associated fixes/changes. 
- I'm unsure about "bestF" in the master_controller (whatever it is) but this change seems to work fine in testing. 
- Added to weekly milestones due to numerous requests for a revert, as well as the new algorithm's ongoing poor performance on the live server.