Performance

* Optimize astar.search by moving pathTo function outside scope
* Efficient Graph.prototype.toString
* Use Performance API if available