Backport the new testing app.

This transitions the new testing app on master to older releases. This
contains utilities for making it easier to write new unit tests without
the need of slow-to-load fixtures, and adds fixture caching.
Add ExtensionMiddlewareRunner middleware.

This allows extensions to inject middleware. This is useful for things like
authentication methods which need access to the request.

Testing done:
All tests pass:
Ran 746 tests in 68.571s
OK (SKIP=12)

The skipped tests are all related to perforce, which I don't have installed.
They should be unrelated to my patch.

Reviewed at https://reviews.reviewboard.org/r/4563/
Serialize "service" field in /api/hosting-service-accounts/

The service field wasn't being serialized correctly, which meant that if you
tried to use this resource to get a list of things, you'd get a 500 instead.

Testing done:
Connected a GitHub repo, then $ curl /api/hosting-service-accounts/

Reviewed at https://reviews.reviewboard.org/r/4702/
Merge branch 'release-1.7.x'