Switch to using UglifyJS for JavaScript builds.

UglifyJS is a more dependable minifier that does a better job at
compressing JavaScript files. We have been using a Python fork of jsmin,
which isn't being actively developed, and has had some bad releases that
has broken us. With UglifyJS, we can be more confident in stable
releases from here on out.
Release Review Board 1.7.18.
Add the field mirror_path to RepositoryResource.

This adds the mirror_path field to RepositoryResource. This field
was previously not exposed in the API.

Reviewed at https://reviews.reviewboard.org/r/4897/
Fix a stray comma in RepositoryResource.

This comma was accidentally introduced in a recent change to
RepositoryResource, and broke things. It's now removed.
Fix displaying review requests for a group on a Local Site.

The page showing review requests for a group wasn't passing in the
Local Site, due to a recent change. This meant that those using Local
Sites would get a blank list of review requests when viewing a group.
Add protection against a null LocalSiteProfile.permissions.

It appears that it's possible a LocalSiteProfile.permissions to be None,
and in this case, permission lookups will fail. We're now more careful
about this, and default it to {} when processing.
Fix default focus in the Review form.

The default focus for text areas in the Review form wasn't always
correct. This has been fixed on master, but not 1.7.x. We now tell all
the inlineEditors not to focus themselves by default, so that we can
control the focus.
Fix for LDAP authentication with LDAP servers that don't allow anonymous searches

When authenticating a user for login, the current code does an anonymous search
to find the user, and then attempts to bind as that user when the search
results contain that user. This is a problem since some LDAP servers do not
allow anonymous searches. Fix is to do the anonymous search still, but if the
search results in no entries, attempt to bind as that user anyways by
constructing DN from the username plus configured base DN. If the search does
contain the user, use the DN in the returned result.

Testing done:
Tested in-house with LDAP server that doesn't respond to anonymous searches.

Reviewed at https://reviews.reviewboard.org/r/4953/
Switch over to django.contrib.auth.views.login

Once upon a time, django.contrib.auth didn't have a built-in login view. As of
about half a decade ago, it does. This means we can kill the one in djblets,
which isn't nearly as well maintained.

This change switches us over to the new view and form, which works pretty
similarly to the old one. The major differences are in the naming of the error
fields, 'next' vs. 'next_page' (which I'll deal with once I stop using
djblets.auth.util.login_required), and CSRF protection.

Testing done:
* Tried to login with an invalid username and password and saw the right error.
* Tried to login after fiddling with the CSRF token and saw a 403.
* Logged in with a valid username and password and was redirected to
  /dashboard/
* Checked that when I accessed a page when logged out I was redirected to log
  in, and then once I logged in, I was redirected back to that page.

Reviewed at https://reviews.reviewboard.org/r/4931/

This change has been cherry-picked from the master branch.
Upload Review Board releases to Amazon S3.

We're now using Amazon S3 to store all our releases. This updates our
release script to do that. It requires our new 'fabazon' module to help
interface with S3 and perform S3 uploading and directory index
regeneration.
Merge branch 'release-1.6.x' into release-1.7.x
Remove an extra file from a merge.

This file ended up here through some merge, and shouldn't have been
here. It's been removed.
Update link to extensions doc.

The 1.7.x documentation had a link into the dev manual for creating extensions,
which is probably where we want to be directing people, but it never got
updated when I moved the extensions documentation. Trivial fix.
HTTP Basic authentication does not work with fastcgi

HTTP basic authentication fails to work when using the fastcgi configuration,
thus the API does not work. Solution suggested from
https://bugs.php.net/bug.php?id=35752

Testing Done:
Without the patch API calls fail. With the patch API calls succeed.

Reviewed at https://reviews.reviewboard.org/r/4934/
Support two-factor authentication for GitHub.

This adds support for two-factor authentication when linking an account
for a GitHub repository. Two-factor auth is much safer, and is something
to be encouraged, but was not previously usable with Review Board.

We only ever authenticate when linking an account for the first time, in
order to get an OAuth token. The repository form now has support for
HostingServices to raise a TwoFactorAuthCodeRequiredError, which
indicates the service needs an authorization code to continue.

The repository form responds to that by displaying a field where the
user can enter their auth code. The HostingService will be passed this
code and can include it in the authorization request.

There are no other points where a two-factor auth token is needed for
GitHub, since requests using OAuth tokens do not need two-factor auth
tokens.
Fix the unit tests for API caching.

The recent fix for ETags in Djblets broke the unit tests, which weren't
providing the headers Django sets nowadays. This updates our common test
function for caching to use the correct header.
Merge branch 'release-1.7.x' of https://github.com/reviewboard/reviewboard into release-1.7.x