Test overhaul

This branch reduces the amount of global state that tests share with each other (from test.wsgi_app) by using a mock app object instead of module globals. It also uses a context manager to regularize the way intercept install/uninstall is done in tests, do a better job ensuring uninstalls occur, and reduce the boilerplate for install/uninstall inside new tests.

This is intended to make the unit tests a little more deterministic, and to make it slightly less painful to add a new test for all the intercept backends, or to add a new set of tests for a new intercept backend.