Add support for BitBucket's APIs, and support for Git.

We now use BitBucket's APIs for repository validation and for file
fetching. This, combined with usage of the new base_commit_id field,
allows us to finally add support for Git on BitBucket.

Unit tests were added to test all this functionality.