Added hook for alternative route matching.

This patch enables the user to replace the route matching logic (i.e. switchMatchRouter() ) with custom logic via a callback function.

It strikes me that no routing scheme will ever keep everyone happy. A pragmatic solution to this is to allow plugable routing logic. This is a fairly straightforward way to do this.

Any feedback will be appreciated.