Fix "From" field in emails for --submit-as

When sending emails for review requests, reviews, and replies, we'd send it
from the request user, rather than the owner of the relevant object. This made
using --submit-as pretty ugly.

At some point in the future, we want to enable many users to collaborate on the
same review request, at which point we'll have to revisit this, but for now,
fix the bugs.

Testing done: Ran unit tests

Fixes bugs 1795 and 2500.
Reviewed at https://reviews.reviewboard.org/r/4418/
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.
Redo the "New Review Request" UI.

This is a mostly complete rewrite of our "New Review Request" page to support
both pre- and post-commit reviews.

For repositories which support it (currently SVN and GitHub), it shows two
sections: "New Review Request for Pending Change" and "New Review Request for
Committed Change".

The pending change workflow is similar to what we had before in its
functionality, but it's a bit more streamlined (in the simplest case, it's just
"click on the repository name and then drop a diff file in the box"). It also
tries a little bit harder to validate that the diffs that people create are
valid before actually putting anything in the database, and shows some better
error messages (especially in the case of git without --full-index).

The one feature that the old forms had was parent diff support. I've decided
that for now, it will just point people to using rbtools.

The post-commit workflow is super easy--select a branch, and select a commit.

Testing done:
- Created a ton of review requests against various different repositories.
  Verified that I can do post-commit requests for GitHub and SVN, and that I
  can do pre-commit requests for any repo.
- Checked that the "None" repo allows me to create an empty review request.
- Ran js-tests and python unit tests
- Ran jshint

Fixes bug 100.
Reviewed at https://reviews.reviewboard.org/r/4215/
Markdown Review UI

This adds functionality to render Markdown file attachments in Review Board.

The rendering is handled by the "markdown" Python package which, given a file,
returns the HTML code for it. This HTML code is then passed to the Backbone
view for the Markdown Pluggable UI through the template and rendered in the
browser.

This is based on the change at https://reviews.reviewboard.org/r/3434/
The major changes are:
- Port to the new 1.8.x JS model/view parameters and remove the extra template
  file.
- Use safe_mode='escape' when rendering to disallow users from using arbitrary
  HTML tags.
- Add comment thumbnails, so we get excerpts in the reviews page. I can't
  decide if using minidom to parse the outputted HTML and extract a specific
  node is awesome or awful, but it seems to work very reliably and keeps us
  secure.
- Cache the rendering of the markdown file, which comes in handy for those
  comment thumbnails.

Testing done:
"Valid" Case:
1) Created a review request and uploaded multiple random files to it
2) Then, uploaded a valid Markdown file (with the extension .md) to that review
   request
3) Clicked the "Review" link for the Markdown file
4) The new page loaded should render the Markdown file

"Invalid" Case:
1) Created a review request and uploaded multiple random files to it
2) Then, uploaded an image to that review request by changed the file extension
   to be ".md". For example, wallpaper.png -> wallpaper.md
3) Clicked the "Review" link for the invalid Markdown file
4) The new page loaded did not render anything (i.e. it displayed the title and
   caption but nothing was displayed in the section where the HTML would have
   rendered)

Reviewed at https://reviews.reviewboard.org/r/4414/
Set a sane default for hosting_service when validating repos.

We were accessing hosting_service without ensuring it always had a
value. We now default to None.
Merge branch 'release-1.7.x'