Backport the unicode changes for RegistrationForm.

The recent unicode cleanup removed some ancient form encoding logic in
RegistrationForm. This logic wasn't really necessary nowadays, and
mostly just caused trouble, as it expected every field on the form was a
string. That made it difficult to subclass and use things like
dictionaries or lists.

This backports just the part of the code that deals with fetching fields
from the form.
Add better labels for the RegistrationForm.

RegistrationForm didn't provide labels for the password1, password2, or
email fields. This meant that any template that used RegistrationForm
had to in some way override the displayed labels. Now they have sensible
defaults.
Merge branch 'release-0.7.x'
Release Djblets 0.7.25.
Merge branch 'release-0.7.x'
Support specifying standard and extension-specific middleware.

Extensions recently gained support for loading additional middleware,
and I recently updated it to require that the middleware take an
extension parameter in the constructor. However, this makes it harder to
use middleware provided by third-parties that aren't extension-aware.

Now, we introspect the middleware's constructor and see if it's
extension-aware or not. We can then initialize it appropriately.
Don't break production servers if an extension cannot initialize.

If an extension raises an exception during initialization, it can take
down a site. This can be useful to see on a developer install, in
order to help fix these problems, but it's pretty bad when a production
site goes down. Instead, we want to just skip loading the extension.

This is just one step of the way toward better sandboxing. Ideally, we'd
be able to mark the extension as having errors, and see that in the
extension list with some meaningful information, but that requires more
plumbing.
Add a signal to notify when an extension's settings are saved.

A pattern with extensions was to have an extension's SettingsForm
subclass call into the Extension when the form saved, in order to
operate on the new values. However, that only really covers when
SettingsForm saved, and wasn't really the best way to do things.

This change introduces a new signal, settings_saved, which is emitted
whenever an extension's settings have been saved. Extensions can listen
to this, with 'self' as the sender, in order to operate on any new
settings.
Initialize Lazy Strings before passing to json.dumps

When trying to view the Repository Admin page, the master branch throws a
"Object is not serializable" error because the value getting passed is a
Promise (django.utils.functional.Promise) object rather than a decodable
string. Create a LazyEncoder that will check for this type and call force_text
on it so that it gets initialized properly. Reference:
https://docs.djangoproject.com/en/dev/topics/serialization/#id2

Testing Done:
WebUI - Ensured that the repository admin page works fine.

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