Fix caching to be testable.
The old way didn't work because our ``cache`` object was global. It
would get configured by the first test and then never be reconfigurable
for other tests.
This gets fixed here by hanging the cache region on `flask.current_app`
so that it gets reinstantiated and reconfigured for each test run (and
each WSGI process).