Improve testing infrastructure reusability for the web API.

The testing infrastructure was fine for the Review Board API tests, but
wasn't as nice to work with for anything else that wanted to reuse the
test infrastructure. In particular, the assumption was made that all
APIs can be bound to a Local Site, but this isn't always true.

This assumption has been removed. The default is still to test APIs
against a Local Site, but by setting `test_local_sites = False`, this
will be turned off.

Along with this, create_repository() can now accept a `local_site=`
parameter, and subclasses of BaseWebAPITestCase can now override the
mimetype for expected errors.