SCM Web Hooks for reviewboard : Phase 1

Generate url infrastructure for hosting services so that they can be called to
access web hooks. Added repo_urlpatterns to the service base class. Modified
registration and unregistration of hosting services to add and remove
urlpatterns respectively.

Testing Done:
Wrote test case HostingServiceUrlPatternTests in hostingsvcs.tests.py. I've
tested the addition and deletion of url patterns during registration and
unregistration, respectively. Added tests for cases when the url_patterns are
not defined. Also tested adding bitbucket url patterns (see screenshot). All
tests have passed. :)

Reviewed at https://reviews.reviewboard.org/r/5510/
Add GitHub post-receive hook to close review requests automatically.

This is a GitHub 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:
Added the post-receive webhook URL to a private GitHub repository, and tested
different pushes:
- Commit with a review request ID that is not submitted (verified that the
  review request is closed and set to submitted)
- Commit with a review request ID that is already submitted (got a warning that
  the review request is already submitted)
- Commit without a review request ID in the commit message (got a debug message
  that no matching review request ID was found)
- Commit with a private review request (verified that the review request is closed)
- Commits referencing the same review request ID
- Multiple commits
- Merge commits
- Branch creation and deletion
- Commits pushed to two branches

I also overrode the regex and flags in settings_local.py, and got the expected
change in matching review request IDs.

Reviewed at https://reviews.reviewboard.org/r/5596/
Add confirmation when discarding a review request.

This prompts the user for confirmation when discarding a review request through
Close -> Discarded, which will help prevent accidental discards.

Testing Done:
On a review request, I clicked Close -> Discarded, and got the confirmation
dialog. Clicking "Cancel" left the review request unchanged, and clicking "OK"
discarded the review request.

Bugs closed: 3117

Reviewed at https://reviews.reviewboard.org/r/5659/
Fix up a few webapi-lint errors.

The webapi-lint script had one unicode issue that was causing it to crash.
After I fixed that, I went through and fixed a handful of small issues that it
found.

Testing done:
* Ran webapi-lint
* Ran unit tests

Reviewed at https://reviews.reviewboard.org/r/5662/
Merge branch 'release-2.0.x'