Added initial inline js routing functionality

Compiles routing information to inline js closures negating the need to use an external js routing library.

This PR is a work in progress and isn't ready to be merged yet.