Don't break when trying to check if TemplateHooks apply on 404s.

On 404 pages, the request doesn't have a resolver_match. For TemplateHooks
that apply to base.html (like the base-css hook point, for example), this
was problematic because 404.html extends base.html, and so any TemplateHook
that injects itself in a base hook point on only certain pages would cause
breakages since the resolver_match couldn't be checked to see if the
TemplateHook should actually apply.

Reviewed at https://reviews.reviewboard.org/r/6035/.
Fix various issues with configforms table views.

There were a few of bad assumptions made when using
TableView/TableItemView for configform item lists.

One was that there was already a <tbody> defined. This was the case in
the few places where we used it before, but isn't not always going to be
the case. We now add one if it's not already there.

The second bad assumption was that actions go on the element. In the
case of TableItemView, this is a <tr>. Now, ListItemView/TableItemView
subclasses can define a function to return where the actions should be
added. For TableItemView, this defaults to the last cell in the row.

The third bad assumption was that, by default, ListItemView would be
used if not specified otherwise, even for TableView. Now, ListView
subclasses can define their default.

Along with this, the template for TableItemView has been cleaned up to
remove extra whitespace, which matches a change made recently for
ListItemView.

Unit tests were added for all this. Some existing tests had to be
cleaned up, though, since they polluted prototype-level data.

Reviewed at https://reviews.reviewboard.org/r/6050/
Fix issues enabling extensions containing copy/pasted settings.

When enabling an extension and installing its media, we work with a lock
to ensure that two processes aren't attempting to install media at the
same time. We then remove the lock file. This happens until the old
stored version in settings matches up with the current version of the
extension.

Where this falls apart is if an administrator copy/pastes a settings
dictionary from one server (say, a test server) into a disabled
extension's settings in the database editor, and then tries to enable
it. The versions will match up, but the extension won't be installed
yet, so we'll go through the locking phase. However, since the versions
match, we don't actually create a lock, and then we blow up trying to
remove it.

If the extension's data is not yet installed, its old version (if any)
is not to be trusted. Treat it like a fresh install.

Reviewed at https://reviews.reviewboard.org/r/6054/
Clean up some PyFlakes warnings in Djblets.

This cleans up a few small PyFlakes warnings in the Djblets code. These
warnings were harmless.

Reviewed at https://reviews.reviewboard.org/r/6068/
Clean up all Djblets JavaScript warnings and errors from jshint.

This goes through and cleans up all the warnings and errors that jshint
reported. Only one of these (an extra comma) would lead to page
breakages, but the rest should help with some optimization and code
size.

There were two changes made that were bigger than just using '===' or
similar.

datagrid.js has had its initialization code moved to the bottom of
$.datagrid, in order to define functions up-front (as jshint wanted)
instead of defining functions after being called. In practice, this
wouldn't cause any issues, though.

scrollIntoView() now caches $(window), $(document), and $(this) in order
to reduce execution time. I had to condense var statements there anyway,
so I just moved those out.

Reviewed at https://reviews.reviewboard.org/r/6055/
Fixed log initialization on Windows.

The log initialization code for Windows was using the wrong module path for
'FileHandler'. This updates it to use the correct path, allowing the log
initialization to work again on Windows.

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