[#1248] Make sure that the wsgi.url_scheme is correctly set before any other middleware runs
This is necessary because EasyWidgets uses wsgi.url_scheme to construct static
resource urls, and it picks up this environ variable at the beginning of the
request, before any code in _base has run.