Efficient Graph.prototype.toString

- Optimize with .join rather than lots of string concatenations
- Add comment to specify that .toString() only work in grid layout mode
Use Performance API if available

Performance API is more precise
https://developer.mozilla.org/en-US/docs/Web/API/Performance

http://updates.html5rocks.com/2012/08/When-milliseconds-are-not-enough-performance-now

Note: I did not switch new Date().getTime() to Date.now() because it
only works with IE>8.
But this might be interesting because Date.now() is faster than new
Date().getTime() (no object creation).

http://stackoverflow.com/questions/12517359/performance-date-now-vs-date-gettime
Move pathTo function outside astar.search

This small optimization avoid to redefine the pathTo function in memory
each time astar.search() is called.
Merge branch 'master' of https://github.com/TiTi/javascript-astar