Move logic to Rack middleware

BREAKING CHANGES! (But no API changes beyond the initial configuration.)

This PR moves the logic that sets and unsets `Agency.current` into a Rack middleware. The controller just contains a bunch of helpers now. So an implementation might look like:

    # config/application.rb
    config.middleware.use RestrictedSubdomain::Middleware, through: -> { Agency.active }

    # app/controllers/application_controller.rb
    use_restricted_subdomains

Note: *Any* Rack apps mounted into Rails through `config/routes.rb` will inherit this middleware, which may or may not be desirable. If it's not, then one can mount those apps in `config.ru` instead. (This is actually the reason for the change - some mounted apps may need restricted behavior while others do not.)