Sandbox calls to TemplateHook.applies_to()

Extensions that create a TemplateHook subclass with a new applies_to function
can throw an exception inside Djblets. The part of Djblets that calls that
method has been sandboxed.

Now when a TemplateHook subclass's applies_to() function from an extension
throws an exception, the error is caught and logged.

Testing Done:
Unit test has been written to make sure that applies_to() from a TemplateHook
subclass has been called, and when an exception is thrown it gets logged.

The test fails without the sandboxing, and succeeds with it.

Reviewed at https://reviews.reviewboard.org/r/6545/
Fix a regression in passing signal arguments in SignalHook.

The recent sandboxing of SignalHook broke the passing of arguments to
the callback. This fixes that by passing kwargs, and adds a unit test to
ensure it doesn't break again.

Reviewed at https://reviews.reviewboard.org/r/6580/
Enhance extensibility of the siteconfig settings template.

The siteconfig settings template has some new blocks that allow for
better overriding of content, especially when used through the
configure_extension.html template.

The page title can now be changed without overriding the entire title
tag. There's a block for the particular page's subtitle, separate from
the page-wide title block.

The buttons box at the bottom of the page can be replaced or augmented
as well. The Save button can be replaced, and pages can add additional
buttons wherever they wish.

Reviewed at https://reviews.reviewboard.org/r/6581/
Merge branch 'release-0.7.x' into release-0.8.x