Add a generic barebones Router class to core to allow registration of
routes in a central place and deal with potential clashes in future.
See patches making use of the router:
- Kartographer extension I456a4582a67e31533d51d5817d0f4af57528c35e
- mediawiki.special.preference If7cb76e362464943df20598bd09fd341574756c4
Bug: T114007
Change-Id: I4295db446eac7cf24a3ed89edfa9eefa5cb34b73