Support custom HTTP methods for hosting services API calls.

This extends the API set for HostingService to allow subclasses to call
other forms of HTTP methods. For now, I've only added HTTP DELETE, which
will be used by an upcoming change.
Added a management command for resetting GitHub auth tokens.

With the new Heartbleed vulnerability in the wild, GitHub recommends
resetting all authentication tokens, just to be sure. This change
introduces a management command that makes that somewhat easy.

This command will loop through all GitHub accounts that are linked to
Review Board, resetting their tokens and replacing them new, valid
tokens.

If using a registered GitHub OAuth app for Review Board, then the resets
won't require any credentials. However, for personal tokens (which is
the standard case), it will require a password, and possibly a
two-factor auth token.
Support custom HTTP methods for hosting services API calls.

This extends the API set for HostingService to allow subclasses to call
other forms of HTTP methods. For now, I've only added HTTP DELETE, which
will be used by an upcoming change.
Merge branch 'release-1.7.x' into release-2.0.x
Fix an issue when merging the reset-github-tokens code.

This was still using simplejson, and should have been converted to json.
Return a proper error for authorization failures in GitHub.

Authorization failures in GitHub were appearing as standard
HostingService errors. We now check the error code and properly return
an AuthorizationError.

Reviewed at https://reviews.reviewboard.org/r/5686/
Improve the note field for GitHub auth tokens.

When registering GitHub auth tokens, we send a note indicating what the
token is for. This was always hard-coded, making it hard to
differentiate tokens.

It also seems as if recently, GitHub started colliding tokens with the
same note.

To fix this, we now include part of the URL in the note, and also a
UUID. This should help prevent any future collisions.

Reviewed at https://reviews.reviewboard.org/r/5687/
Merge branch 'release-1.7.x' into release-2.0.x
Add release notes for 1.7.23.

This covers the fixes made in this release, and also has a section on
the impact of the Heartbleed vulnerability, with instructions on
resetting GitHub OAuth tokens.
Release Review Board 1.7.23.
Merge branch 'release-1.7.x' into release-2.0.x
Fix the rendering of the Manual Updates page.

A recent regression caused this page to render the wrong templates for
the update notifications. We now properly show the correct template.
Fix a missing endif tag for the Show SSH Public Key template.

When this change was backported to 1.7, an endif tag was left out. This
adds it back, and fixes indentation so that future mistakes won't be so
easily made.
Release Review Board 1.7.24.
Merge branch 'release-1.7.x' into release-2.0.x
Expose some JavaScript resource models and make them more useful.

This moves Repository and associated models into the 'common' bundle, so
that they can be used outside the New Review Request page.

It also adds rspNamespace fields to Repository and ReviewGroup, allowing
them to successfully parse payloads from the server.
Fix the order of validateDiffModel.js in the media bundle.

My previous change placed validateDiffModel.js too high, resulting in
errors on some pages. This moves it lower.
Use siteconfig_settings for settings access.

We had hacks around the templates for falling back on defaults if
settings were missing from siteconfig. This was missing in some cases,
and resulted in breakages in the case of displaying gravatars (a recent
change).

Djblets now provides siteconfig_settings, which allows access with
falling back on defaults. This change updates all templates to use it.

Reviewed at https://reviews.reviewboard.org/r/5694/
Fix the state of our JavaScript unit tests.

Our unit tests have regressed a bit recently, for a few reasons.

First, we were still trying to run the old configForms code, which
shouldn't have remained in the codebase. This has now been deleted, and
the new djblets-js-tests bundle has been loaded in to run the proper
configForms test suite.

Second, the recent addition to confirm the Discard Review Request action
resulted in the confirmation dialog appearing during the test run. We
now spy on window.confirm and provide a proper result in order to
prevent this.

Reviewed at https://reviews.reviewboard.org/r/5700/
Bitbucket post-receive hook

This is a Bitbucket post-receive hook that will automatically close review
requests as "submitted" after a push. To determine which review requests should
be closed, it scans through each commit's commit message for the following
strings (case-insensitive): "Reviewed at <reviewboard_url>/r/<id>" or "Review
request #<id>". The regex used for this can be overriden in settings_local.py.

Testing Done:
Basic testing on a git repo performed. Test passed successfully.

All tests carried out on both mercurial and git repos.

Tests:
1) Close an open review request.
2) Try to close a review request that already has been closed as submitted.
   (Logged a warning saying that the review request has already been
   submitted).
3) Try to close a discarded review request. (Marked the review request as
   submitted)
4) Push without a review request id in commit message. (Error logged that the
   request id does not exist).
5) Push with a non existent request id in the commit message. (Error logged as
   Review request id does not exist.)

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