Move /tests handler into its own middleware

The /tests behavior was coupled to the auto and location behavior, despite the fact that all location types will need to map `/tests` to the `tests/index.html` file.

I've moved tests into its own middleware which also clarifies what the behavior for `/tests` is. This refactor corrects a bug where hash location servers would redirect to `/tests/`.