Refactor UrlManager, bootstrap Gii to add its own routes.

This change refactors UrlManager::compileRules() to expose two public functions to allow modules to create and add their own routes.

It also adjusts Gii to use BootstrapInterface to automatically register routes to ensure it can be accessed with pretty URLs, no matter what routes are defined in the app config.