Localhost exception fixes

These changes fix the 1.x-stable testing suite.

The strategy I went with here was like stitching in various new auth capillaries to treat the sudden cardiac arrest of our tests under the narrowed localhost exception.  We could have instead been performing open-heart surgery, and this would have resulted in a more sane, less brittle test suite in exchange for much more development time and many deeper, larger changes.  The ideal solution, through surgery, I believe would look like this:

- top-level test runner initially creates an admin user in the database.
- all tests check out clients from the test runner, which come to them pre-authenticated.
- tests run with no knowledge of authentication.  Tests that explicitly test auth-related features have access to admin credentials and can logout and authenticate as-needed on this client.
- the top-level test runner is resilient to tests that mess up the state of the world (ie drop all users from the database, or add new users or roles) and will reset itself as-needed.

The current solution looks like this:

- each test assumes that it is being run under the localhost exception (before any users exist in the database).  Each test creates its own clients, attempts to add an initial user, and authenticates.
- after running, each test removes all roles and users from the database, resetting it to the localhost exception for the next test.
- all helper methods that handle authentication in any way are resilient to any tests messing up the state of the world (tests not cleaning up properly, for example)

The current solution works because all the auth-related helper methods rescue auth-related exceptions willy-nilly and try again.  This is messy, slow, and hard to debug, but makes some sense given the structure of our original tests--which is to say that they have a fine level of control over things like clients, and each test handles these in a different way and with a different style.  To go through all of these tests and unify their behavior in this respect would be a large task, arguably a very useful one.  Then again, as we shift this test suite into maintenance mode, arguably not worth the time.

So, the point of this all going forward is that we keep in mind the obstacle of the narrowed localhost exception when writing new tests, and in the new driver, strive to build a test suite that is much more unified in this way.