Add team support for Bitbucket repositories.

Review Request #4560 — Created Sept. 12, 2013 and submitted — Latest diff uploaded

Information

Review Board
release-1.7.x

Reviewers

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.

Tested with an existing repository that didn't have a plan set. I could
view old diffs and upload new ones. Viewing the repository settings worked,
as did reconfiguring the repository.

Created a new personal Git repository. I was able to create and view review
requests with diffs.

Tested the same with a team Git repository.

Unit tests pass.