Allow a custom dispatcher to be provided to routing.

The two commits are related but independent: one allows a configurable dispatcher, the other exposes some useful internals of the existing dispatcher to subclasses.

Motivation for this change is to support automatic generation of wrapper controllers for poniard, like this: https://github.com/xaviershay/poniard/pull/2

As a bonus, this change is clearly useful for testing as well, since we can get rid of the ugly constant stubbing :)

cc @rafaelfranca