Ability to have non-grid layouts

Hello,

Check out my commit and tell me what you think.

Your A* is great but was limited to a grid layout. I've added the ability to handle other layouts, such as a graph of cities.

- Extract grid specifities into the Graph function
- Extract heurstics functions into a specific object
- Update tests, benchmark & demo
- Added a specific test to demonstrate usage and gps heuristic
Please add these two lines up here and remove the two assignments from the bottom of the function:

    var nodes = this.nodes = []
    this.diagonal = !!diagonal; // Optionally find diagonal neighbors as well (false by default).