Add team support for Bitbucket repositories.

The new Bitbucket hosting service rewrite, which brought along Git
support, only worked for personal acounts. It didn't support team
accounts.

Now, Bitbucket supports two types of plans: Personal, and Team.
This works much like the various plans for GitHub. Depending on the one
selected, we configure requests against the repositories differently.
For personal accounts, the repository owner name in the URL is the
username of the owner, For team accounts, it's the team name, which is
requeste during configuration.

This works with existing configurations. It's assumed that any Bitbucket
repository configuration without an explicit plan set is a personal
account.
Pre-compile fixtures for unit tests.

Django's fixture support is extraordinarily inefficient. For every
single unit test, it does the following:

* Recalculates the list of possible fixture directories
* Locates each fixture file within those directories
* Tries to figure out how to deserialize them
* Deserializes them
* Saves them

That's done per-test. Most of those operations are things that could be
easily cached, including the deserialized fixture content.

Our TestCase rewrites fixture loading to do just this. When we see a new
fixture, we precompile it, getting the list of objects and storing it.
We then use that precompiled version whenever the fixture is requested
for future tests.

This saves 10 seconds on the test suite.
Change django.conf.urls.defaults -> django.conf.urls

Django 1.4 changed the namespace for 'patterns' and 'url' from
django.conf.urls.defaults to django.conf.urls. This was listed in the
deprecation notes, but we never updated it because 1.4 maintained
compatibility. 1.5 got rid of the compatibility shim, so we need to actually
update now.

Testing done: Ran unit tests

Reviewed at https://reviews.reviewboard.org/r/4566/
Add a unit test for API get_list permissions checking (release-1.7.x)

This adds a unit test to verify that get_list checks permissions for parent
resources properly. The actual fix for this is in Djblets' WebAPIResource.

Testing done: Ran tests
Reviewed at https://reviews.reviewboard.org/r/4558/
Add a unit test for API get_list permissions checking (master)

This adds a unit test to verify that get_list checks permissions for parent
resources properly. The actual fix for this is in Djblets' WebAPIResource.

Testing done: Ran tests
Reviewed at https://reviews.reviewboard.org/r/4559/
Merge branch 'release-1.7.x'
Add team support for Bitbucket repositories.

The new Bitbucket hosting service rewrite, which brought along Git
support, only worked for personal acounts. It didn't support team
accounts.

Now, Bitbucket supports two types of plans: Personal, and Team.
This works much like the various plans for GitHub. Depending on the one
selected, we configure requests against the repositories differently.
For personal accounts, the repository owner name in the URL is the
username of the owner, For team accounts, it's the team name, which is
requeste during configuration.

This works with existing configurations. It's assumed that any Bitbucket
repository configuration without an explicit plan set is a personal
account.
Merge branch 'release-1.7.x'
Require the latest releases of Django 1.4.x and Djblets.
Don't show the static media collection output when running tests.

This output was useless to us, and just created noise and slowed down
the running of tests. Turn off verbosity for that step.
Release Review Board 1.7.14.
Merge branch 'release-1.7.x'
Raise an error when uploading a non-git diff to a git repository.

When uploading a non-git diff (whether an image file or anything else),
GitDiffParser would assume it's just an empty file. We now sanity check
this better by seeing if we parsed any files, and if not, if we're
dealing with a non-empty file. If no files were parsed and the file is
not just empty or whitespace, we assume it's some unknown file type.
Fix a couple regressions in the diff viewer.

This fixes two regressions, one new, and one that's been around since
the rewrite.

The new one blocks viewing unpublished diffs. The template code setting
up the diff-related models was assuming the existence of the
latest_diffset object, which didn't exist in this case. The result was
that no value was outputted, leading to invalid JavaScript, which
prevented any diffs from loading.

The second was a visual glitch that resulted in an extra ">" before the
expand links for headers. This was due to the ">" being after the wrong
endif tag.
Make PySVN optional for unit tests.

The unit tests no longer depend on PySVN. Some of the remaining tests
using Subversion repositories have been updated to use Git instead, and
the rest now use a new TestTool that is based off Git but has many
testable properties for things like branches, commits, basedir, etc.

You can now remove PySVN from your system and run the test suite. The
real Subversion-specific tests will just skip, and all main tests will
run.
Add the missing scmtools.py.

This was left out of my testing improvement change.
Move the diff revision selector into javascript.

Rather than generating this from the django template and including links, it's
now generated on the client-side, and clicks are handled by triggering the
"revisionSelected" event. This still ends up navigating to another page, but
it's a step towards avoiding the reload.

Testing done:
* Navigated to different diff and interdiff revisions.
* Ran js-tests.
* Ran jshint.

Reviewed at https://reviews.reviewboard.org/r/4565/
Clean up the view_diff.html template.

This change removes some obsolete variable definitions, fixes indentation on
template tags, and generally cleans things up.

Testing done:
Played around with the diff viewer a bit and checked that things looked right.

Reviewed at https://reviews.reviewboard.org/r/4568/
Provide WebAPIResource in reviewboard.webapi.resources again.

The recent API codebase restructuring moved WebAPIResource into
reviewboard.webapi.base, but older extensions expected this to be found
in reviewboard.webapi.resources. That's completely valid, so now we
provide it there as well.

Older extensions importing the various resource instances will still
need to be updated, though.
Fix unit test failures when the host has no internet connection.

One annoying aspect of working on planes is that several of the unit tests fail
in ugly ways if the host has no internet access. I've added a check that tries
to resolve the hostname for google.com and skips any tests that require network
access.

Eventually, we should fix these tests to use mocks running on the host to
completely isolate us from third-party servers and internet connections.

Testing done: Ran unit tests whilst in-flight.
Reviewed at https://reviews.reviewboard.org/r/4569/