JOINDIN-495 - Simplifying the front controller and encapsulating more functionality

Ref: JOINDIN-495

I've reduced the amount of code in the front controller (index.php) significantly; I've moved some logic to the Request class and also introduced a more structured set of Router classes; this structure can later be used to improve the manner in which routing occurs.

Apologies it's so big! Future improvements should be smaller ;)
We intentionally commit the vendor directory as our deployment system doesn't run composer on the server.