Options as object instead or parameter list

Possible implementation of options object for search changing the signature to:
search( grid, start, end, options )

This does not attempt to support backwards compatibility with the previous parameter list, although that should actually be possible to a certain degree without too much overhead.  I'll have a look at that if wanted.

I have also updated the test and demo to use the options object and closest   The 'test' is a bit sketchy to be honest but I don't think I'm willing to get into that right now.  

I realise this is based on my pull request in https://github.com/bgrins/javascript-astar/pull/15 but I'm not too sure what the etiquette is there.