Fix so users with apostrophes won't cause 500 errors.

It's possible to get a user with an apostrophe due to active directory. This
change allows the regex to recognize these users.

Testing Done:
I created a user with an apostrophe in the name and went through the steps to
reproduce the problem (going to users page, as well as trying to assign the
apostrophe user to a review). 500 errors were no longer thrown after my
changes.

Bugs closed: 2890

Reviewed at https://reviews.reviewboard.org/r/4606/
Merge branch 'release-1.7.x'
Allow plus signs in usernames; update docs.

Testing Done:
All unit tests pass except perforce-related ones, which were skipped, since I
don't have it installed.

Reviewed at https://reviews.reviewboard.org/r/5036/
Merge branch 'release-1.7.x'
Emit a 'site_settings_loaded' signal when loading siteconfig.

Extensions may need to override loaded settings, such as adding
additional auth backends. In order to do that, it needs to ensure it can
operate on the settings after loading from siteconfig. This can now
be done through a new signal, 'site_settings_loaded'.
Enable usage of django.contrib.messages.

The Django messages framework has improved quite a bit since the early
days, and is now a useful thing to have in the admin UI. It already
stored cookies with these messages, but they just built up and were
never used or cleared. By activating the context processor, the admin UI
can provide much nicer responses to actions, such as deleting objects.

We can probably make use of this in some good ways going forward as
well.

While activating this, I noticed that output in the admin UI was wrong.
Our HTML was quite broken, since we never tested it before. This has
been fixed.
Fix an exception in the API when accessing file attachments without review UIs.

The thumbnail field in FileAttachment was accessing the review_ui without first
checking it for None-ness. Trivial fix.

Fixes bug 3145.

Reviewed at https://reviews.reviewboard.org/r/5032/
Merge branch 'release-1.7.x'
Reduce the size of the repo_revision field for FileAttachments.

The repo_revisision field for FileAttachments was too long for an
index to be formed on MySQL. This caused issues when upgrading to 2.0
beta 1. We don't really need a revision field this long (and only had it
this long to match the one in FileDiff, which also doesn't need to be
that long).

We now limit it to 64, which is the length of a sha256sum. It should be
long enough.
Look up missing users from the auth backend when using submit-as.

submit-as was only accepting users who were already in the database.
Unlike other places where users are specified, such as during login
or target reviewers, the auth backends were never checked. We now
loop through the auth backends looping through a user if we can't find
it in the database.