Refactor $.fn.bug_infobox and $.fn.user_infobox to share code.

This is the first step in refactoring the infoboxes to use backbone models and
views. The code for user and bug infoboxes was substantially similar, and
there's no reason why they had to be separate. All of the code is now shared,
and the API entry-points (`bug_infobox` and `user_infobox`) just call into the
common method and pass an ID for the infobox element.

Testing done:
Tested that both infoboxes worked as expected.

Reviewed at https://reviews.reviewboard.org/r/6053/
Add better support for added and deleted empty files.

The addition and deletion of 0-length files were not included in the diffs of
review requests. This was especially troublesome when we needed to add or
delete an empty ``__init__.py`` file, for example.

This change adds support for including new and deleted empty files in review
requests for Git, SVN, Mercurial, and Perforce. New empty files will be
displayed with the text "This is an empty file.", and deleted empty files will
be displayed with the text "This empty file was deleted. The content cannot be
displayed." (see the attached screenshots).

Testing Done:
I used rbt post and the "New Review Request" page to create review
requests with different Git diffs, and rbt post for SVN, Mercurial, and
Perforce diffs:
- Diff with 1 new empty file
- Diff with 2 new empty files
- Diff with 1 new empty file, 1 new non-empty file
- Diff with 1 new empty file, 2 modified files
- Diff with 1 deleted empty file
- Diff with 1 deleted empty file, 1 modified file
- Diff with 1 deleted empty file, 1 deleted non-empty file, 1 modified file

After this change, the 3 unit tests that tested parsing a Git diff with a new
empty file failed. (Since a new empty file is now included, the number of files
from parse() has increased by 1.)

After updating the 3 unit tests to reflect this change, all unit tests pass.
The new unit tests also pass.

Bugs closed: 895

Reviewed at https://reviews.reviewboard.org/r/5785/
Fix some jshint errors.

This fixes up some simple errors caught by jshint.

Reviewed at https://reviews.reviewboard.org/r/6099/
Fix visual issues with saving fields during publish.

When publishing a draft review request, we go through and save all open
inlineEditors. This was using the "save" method instead of "submit", which
caused a regression in multi-line fields that use CodeMirror. The result of
this is that the fields would disappear entirely. Switching to "submit" makes
it show the rendered version properly.

Testing done:
Made some changes to "description" and "testing done", and then tried to
publish my draft. Saw that the fields didn't disappear.

Reviewed at https://reviews.reviewboard.org/r/6100/
Make 'rb-site upgrade' replace the example crontab.

Because we changed search backends from PyLucene to Haystack, users need to
change their crontabs to use the new indexing commands. This change makes it so
that we replace the example crontab in the site directory with the templated
version on upgrade.

Some changes had to be made to template processing to avoid making assumptions
about some of the data, since upgrade doesn't ask any questions about domain
name, site root, etc. These aren't required for the cron template, so it all
works OK.

Testing done:
Created a 1.7.x site directory and saw that the sample crontab listed our old
PyLucene-based indexing commands. Ran 'rb-site upgrade' with this code and saw
it replaced with the new Haystack management commands.

Fixes bug 3435.

Reviewed at https://reviews.reviewboard.org/r/6096/
Add bug infobox support for GitHub.

This change adds an implementation of get_bug_info_uncached for GitHub
repositories. This is relatively straightforward (hurray for bug trackers which
give us sane results in json!). The one change I had to make was to make it so
Repository.bug_tracker_service returns an instance rather than a class, and
handles bug_tracker_use_hosting correctly.

Testing done:
Added the Review Bot repository to my server, and told it to use the hosting
service's bug tracker. Saw that links to the bugs worked, and that hovering
over bug IDs showed the infobox with the correct data.

Reviewed at https://reviews.reviewboard.org/r/6049/
Merge branch 'release-2.0.x'
Fix up documentation relating to search-cron.conf.

The example crontab file has been renamed and changed a bit. This change
updates the relevant documentation to match.

Testing done: Built HTML docs.

Reviewed at https://reviews.reviewboard.org/r/6101/
Merge branch 'release-2.0.x'
Allow users to log in using their e-mail address.

One thing that sometimes happens is that users will try to log in using their
e-mail address instead of their username, and then get confused when it doesn't
work. This is exacerbated by the fact that our sessions last a long time, so
it's often been a very long time since users had to log in.

This change makes it so that if a user logs in, and the username isn't found,
it will try to look up their user by e-mail address.

Testing done:
Logged in to my devserver using both my username and my e-mail address.

Reviewed at https://reviews.reviewboard.org/r/6103/
Merge branch 'release-2.0.x'
Add django-reset to dependencies.

We still use 'manage.py reset' in a few cases, and 'manage.py flush' is not an
equivalent replacement. This change pulls in the 'django-reset' package as an
optional dependency, which forward-ports this management command.

Testing done:
Ran './reviewboard/manage.py --help' and saw the reset commands.

Reviewed at https://reviews.reviewboard.org/r/6104/
Release Review Board 2.0.3.
Merge branch 'release-2.0.x'