Add an is_enabled_for mechanism for NavigationBarHook.

This adds a way for NavigationBarHooks to be enabled/disabled per-user. This is
done by adding a new, optional is_enabled_for flag to the constructor, which is
a callable that returns either True or False.

Testing done:
- Ran unit tests.
- Used this in an extension.

Reviewed at https://reviews.reviewboard.org/r/6390/
Allow HostingService Integration through Review Board extensions

This change adds a HostingServiceHook that extensions can use to
register new hosting services.

Testing done:
Unit test have been written to make sure that HostingService subclasses are
registered and unregistered properly.

Reviewed at https://reviews.reviewboard.org/r/6572/
Merge branch 'release-2.0.x'
Add a hook for extensions to register administration widgets.

This introduces AdminWidgetHook, a new hook that extensions can use to register
new widgets for the administration UI. Once the extension is enabled, the widget
registered by the hook will be available for administrators to add to their
dashboard. Widgets will also be removed when the extension is disabled.

Testing Done:

Unit tests have been written to make sure the AdminWidgetHook properly
registers and unregisters widgets. A third unit test checks that the Widget
subclass being registered ends up in primary_widgets list, when primary is set
to True in the hook initalization.

Reviewed at https://reviews.reviewboard.org/r/6573/
Add documentation for AdminWidgetHook.

This adds documentation on how to use the new AdminWidgetHook, along with
usage examples.

Reviewed at https://reviews.reviewboard.org/r/6597/
Added documentation for HostingServiceHook

This change adds documentation and sample code for the newly created
HostingServiceHook.

Reviewed at https://reviews.reviewboard.org/r/6600/
Fix some trailing whitespace.
Merge branch 'release-2.0.x'
Add a blank webapi/admin.py file.

This mirrors the recent addition of a blank models.py file. It helps
when switching back and forth between release-2.0.x and master branches.
Fix formatting errors in admin module according to PEP8

Fixed the following formatting errors:
admin/forms.py:808:13: E265 block comment should start with '# '
admin/forms.py:849:5: E265 block comment should start with '# '
admin/forms.py:850:5: E265 block comment should start with '# '
admin/forms.py:851:5: E265 block comment should start with '# '
admin/forms.py:852:5: E265 block comment should start with '# '
admin/forms.py:853:5: E265 block comment should start with '# '
admin/forms.py:900:5: E265 block comment should start with '# '
admin/validation.py:28:1: E302 expected 2 blank lines, found 1

Testing done:
Ran unit tests for admin module, and ran pep8 again.

Reviewed at https://reviews.reviewboard.org/r/6625/diff/#
Merge branch 'release-2.0.x'
One more PEP-8 fix for reviewboard/admin.

This was part of the change that I just pushed to release-2.0.x, but it only
applied for the code on master.
Clean up git scmtools tests a bit.

This fixes one thing where we're skipping an assertion, and fixes a file
descriptor leak.

Testing done:
Ran unit tests.
Merge branch 'release-2.0.x'
Fix formatting errors in accounts module according to PEP8

Fixed the following formatting errors:
accounts/backends.py:411:80: E501 line too long (86 > 79 characters)
accounts/urls.py:41:80: E501 line too long (95 > 79 characters)

Testing Done:
Ran unit tests for accounts module, and ran pep8 again.

Reviewed at https://reviews.reviewboard.org/r/6624/
Fix formatting errors in cmdline module according to PEP8

Fixed the following formatting errors:
cmdline/rbsite.py:1177:25: E128 continuation line under-indented for visual indent

Testing Done:
Ran unit tests for cmdline module, and ran pep8 again.

Reviewed at https://reviews.reviewboard.org/r/6628/
Merge branch 'release-2.0.x'
Fix formatting errors in site module according to PEP8

Fixed the following format errors:
site/tests.py:90:19: E221 multiple spaces before operator

Testing Done:
Ran unit tests for site module, and pep8.

Reviewed at https://reviews.reviewboard.org/r/6637/
Merge branch 'release-2.0.x'
Fix formatting errors in notifications module according to PEP8

Fixed the following format errors:
notifications/email.py:321:9: E201 whitespace after '('
notifications/email.py:321:9: E272 multiple spaces before keyword
notifications/email.py:322:9: E128 continuation line under-indented for visual indent

Testing Done:
Ran unit tests for notifications module, and ran pep8 again.

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