Fix a regression with the new webapi auth backends.

The webapi auth backends was attempting to short-circuit the actual
authentication in the wrong place, causing an undefined variable to be
looked up. This was breaking requests that included the Authorization
header for a logged in user.

We now check for this in the actual backend, once we have the username.
Release Djblets 0.7.27.
Merge branch 'release-0.7.x'
Add support for custom context processors, and make them and apps ref-counted.

This introduces a new Extension.context_processors list, which defines
context processors the extension wants to have available for all
templates.

It also adds protection for both context_processors and apps.
Previously, extensions were assumed to never list an app that another
extension may list, or that the main application lists. Otherwise,
disabling the extension would remove the main item from that list.

The list of context processors and apps are now ref-counted.
ExtensionManager wraps its own access to
settings.TEMPLATE_CONTEXT_PROCESSORS and settings.INSTALLED_APPS.
It won't add new entries if they already exist, and won't remove
entries unless the ref count drops to 0.
Add new arguments and better heuristics to $.fn.positionToSide.

positionToSide had trouble matching an element when positioned, say, to
either above/below another element, when the left or right of the
element would be scrolled off-screen. The "best guess" logic failed,
since it took into account both positions. Now it only computes the
position for the side it's checking, and leaves computing the other axis
until after it finds the best side.

There's some new options for controlling positioning as well. Instead of
just 'distance', there's now 'xDistance' and 'yDistance'. These both
fall back to using 'distance' if not specified.

'xOffset' and 'yOffset' control offseting the element in the direction
not matched up to a side. That's useful when you want to push the
element by a few pixels in one direction relative to the side.

Last, but not least, fitOnScreen now anchors things going off the top or
left of the scroll position as well, instead of just the bottom or
right.
Add support for checkbox columns to the datagrid.

This introduces CheckboxColumn, which can be used by a datagrid to
handle multiple selection of entries. It will display a checkbox for
every row, as well as a checkbox in the header that, when clicked, will
toggle selection of all the checkboxes in each row.

This is based heavily on on Graeme Coupar's work on
https://reviews.reviewboard.org/r/3796/
Allow the datagrid body to scroll without scrolling the header.

This does some heavy surgery to Datagrid's handling of the table header.
Tables aren't able to scroll only their body. All thead tags will scroll
along with it. My goal was to allow the body to be scrolled without the
header, in order to create a nicer experience with large numbers of
rows.

To make this work, we create two tables: One for the header, one for the
body. We pull out a copy of the header from the original body and place
it in the header table. We then do some work to synchronize all the
widths and to ensure that we don't lose their natural widths.

The details are in the comments in the code, but the end result is that
the table acts as it did across all major browsers, with the difference
being that the body is scrollable.

Now to make it scrollable, a height must be assigned to the datagrid
element, and resizeToFit must be called on resize (after appropriately
sizing the datagrid). The datagrid will then do the rest.
Remove the default z-indexes for modalBox.

modalBox set default z-indexes, but these would often interfere with
other page elements. They're now set to not have a specific z-index,
leaving it up to the element order or the consumer's CSS to specify the
indexes.
Improve and fix parts of the inline editor widget.

This adds some improvements to the widget, making it more useful to
consumers. A consumer can now get the button elements without having to
look in the DOM, and can also get the editing state. This helps with
making intelligent decisions involving the editor.

To improve the apparent responsiveness, the buttons no longer fade
in/out. This was fine to have for a while, but removing animation makes
the editor feel more snappy.

The editor also now forwards 'resize' events from the contained field to
the editor's element. This lets consumers see when autoSizeTextArea, or
a custom widget, has changed sizes, in order to do more intelligent
layout updates.

There was a bug with fading the pencil back in after editing was
completed. It was trying to fade to an opacity of 100, but really, it
should have faded to an opacity of 1.0. It looked like the pencil was
just instantly showing, because it was.
Support custom "end" prefixes for @blocktag.

@blocktag no longer hard-codes `end` as the prefix for the end tag. A
caller can pass `end_prefix="end_"` or similar to @blocktag, which is
useful when naming a function with underscores.

Decorators are expected to act differently depending on whether they're
called in `@decorator` form or `@decorator()` form. Rather than breaking
every single usage of @blocktag by requiring parens (since we now have
an optional argument), we have to do some checking of arguments at the
end to determine what to return. This is pretty harmless in this case,
but worth pointing out.
Improve the extensions page when things go wrong.

Previously, the extensions page didn't handle errors all that well. An
extension whose module couldn't even be loaded (due to an import or
syntax error) would end up causing an HTTP 500 when accessing the
extensions list resource. Trying to enable an extension that had an
error would show an alert with just the exception message and nothing
else of value.

This does a fairly large overhaul to the whole thing by storing load
error information and making them available through the API, both in
resource payloads and error payloads. It also sanitizes the fields in
the resource payloads in order to not crash.

Now, the extensions page will show a traceback along with the extension.
This is shown for any broken extensions on page load, or when attempting
to enable a broken extension.

An extension that has a failure simply in initialization (rather than a
module error) will provide the option to enable the extension, but those
with a module error will not. This is because a full reload is needed to
try loading that module again. To solve this case, a "Reload" button
will be provided any time an error is shown, which will trigger a full
extension manager reload. This all makes it much easier to develop
extensions and see what's wrong.

Trying to enable a broken extension also no longer records it as being
enabled. It will stay disabled unless it enables successfully.

While here, I did some bits of cleanup to the JavaScript and to the
display. Since we now have reload functionality, I added a link to
trigger a reload in order to find newly installed extensions. I also
added some color-based hints to show the state of an extension (enabled,
disabled, error).
Swap column widths when reordering columns in a datagrid.

The new datagrid modifications caused problems when reordering columns,
since the stored widths were left untouched. That would cause the
columns to swap sizes. To fix this, we just need to swap the stored
widths.
Fix URL navigation and text alignment issues in inlineEditor.

inlineEditor's dragged text detection on <a href="..."/> elements would
fail to prevent the default action of navigating to the page after
opening the editor. The mouseup was too late to block this. To fix this
properly, we now register a click event that directly opens the editor
and prevents the default action.

There were also issues with sizing the editor on elements with a custom
text-align property. It wasn't able to find the ideal bounds for the
editor, and would result in a pretty small text field just big enough
for the original text. It now works around this by setting the
text-align property of the parent to "left" while doing the calcuations,
restoring it afterward.
Fix issues evolving an extension's models.

We weren't properly calling Django Evolution's evolve management
command. We needed to go through execute() and not evolve(), in order to
get objects like stdout and stderr set up. Without this, we get an
exception when Django Evolution tries to output any text.

While fixing this, I changed it to take the output from the evolve
command and include it in the stored error. It's now shown to the user,
and logged, when it fails. It also logs when it succeeds and there's
something to show.
Release Djblets 0.8 alpha 2.
Bump to 0.8 alpha 3 dev.
Clean up PyFlakes warnings and errors on Djblets.

This goes through and cleans up the warnings and errors reported by
PyFlakes. Most are harmless, though there were some error messages
referencing an invalid variable for extensions. That variable and the
accompanying part of the message have been removed.
Update localization files.

This is just a new extraction of strings, since I needed new .po files to
upload to Transifex.