Move main views into separate dashboard blueprint

This removes the need to use `app` to build the routes, meaning that
`app` is only ever imported when the application is started. This makes
it possible to separate out the creation of the app, making prioritise
easier to test.