Enable logging of request info for Review Board.

This improves Review Board's logging to use Djblets's new request
logging code. This will log the localsite name (if any), the username,
and the path of the request.
Add signals to notify when fetching/checking a file started/finished.

These signals can be used to hook up code to perform an operation when
fetching files or checking the existence of files, or when knowing when
those fetches/checks are complete.

Along with this, the file in diffutils that did time logging of the
fetch operation has been moved into Repository.get_file, in order to
standardize it.
Add the beginnings of the ReviewRequestEditor and view.

Right now, this just tracks thumbnails and general editing/publishing
state. Most of the real logic still exists in reviews.js.

In time, this will handle all aspects of review request editing.

Unit tests were added for all the current event hookups, rendering,
thumbnail importing, and more.
Add file caching to Repository.get_file and get_file_exists.

We had file caching before in the diffutils code before fetching a file.
This ensured that we would only have to perform this operation once per
path + revision (so long as it stayed in the cache).

That caching support has moved into Repository.get_file directly,
meaning that any call sites will get the cached copy, and not just those
going through diff code.

Along with this, I've finally added caching for get_file_exists. Prior
to this, if you uploaded a diff touching files more than once, we'd
check (and possibly fetch) those files over and over, which could be
expensive (and really hit the rate limits hard for GitHub, in some
cases).

The get_file_exists caching will first check to see if we've already
determined if the file exists. If not, it will check to see if we have
actually fetched the file (using get_file) before, and if so, we
consider the file to exist. Otherwise, we get it from the repository.
Either way, we store that the file was fetched, for future lookups.
Add the missing signals for file fetching/checking.
Merge branch 'release-1.7.x'
Fix a 'request' assertion error in e-mails.

E-mails don't have a 'request' parameter, and so this was generating a
traceback e-mail. Unfortunately, this ended up inside the review e-mails
people saw.

Now the request is optional, rather than required. Confirmed that this
fixes e-mails.
Merge branch 'release-1.7.x'
Handle invalid repositories with Mercurial.

Mercurial wasn't doing any repository validation, meaning a broken
repository path could be used. It also didn't catch the connection
attempts later, causing HTTP 500 errors.

We now have a check_repository that attempts to connect, and some sanity
checking when connecting later on, to make sure users see that something
is wrong.
Merge branch 'release-1.7.x'
Move some action handlers to ReviewRequestEditorView.

ReviewRequestEditorView is now responsible for several of the actions
having to do with the draft. Right now, this consists of the various
forms of closing, reopening, and publishing. Down the road, the others
will move here.

Some of this is still less than nice because of our silly redundant IDs
for actions. That will be cleaned up later as that code gets turned into
nice new classes.
Move out linkifyText, fix some bugs, and add unit tests.

This puts linkifyText into the RB namespace and into linkifyUtils.
There's now unit tests for all the important bits, and that'll set us up
for any future unit tests.

There are also some fixes to the /r/123/ links. Previously, a trailing
slash would be left off of the link, and encasing the link in <> (or
parens, or other things) would cause broken links. Now they're all
handled.
Move field editing to ReviewRequestEditorView.

This moves all our field editing code to ReviewRequestEditorView. This
includes the completion formatters, auto-complete, and then everything
we no longer need in reviews.js such as publishDraft and the draft
banners.

Instead of the old model where there were "edit complete handlers" and
we just operated on anything with ".editable", we now have a basic field
registration system. All the fields we have today are registered, and
part of that registration are things like "Only use the edit icon to
enable editing" or "here's the formatter." This keeps things sane and
readable, and down the road will let us dynamically add new fields.

Unit tests were added as well for the new fields and events.

There's some work planned for later to simplify field IDs on the
elements, so there's consistency between field names in the model and
elements, which will let us remove some of the required metadata and
guessing in field registration.
Move the action menus, DnD uploads and onbeforeunload to ReviewRequestEditorView.

The code from reviews.js for handling the menus, initializing the
DnDUploader and prompting on page change while there are pending edits
have been moved into ReviewRequestEditorView.

The action-related code has been consolidated into a _setupActions
function.
Add support for modifying close descriptions in ReviewRequestEditor.

The close description code has been removed from reviews.js and reworked
for the new review request editor code. Now, each of the three types of
change description inputs have their own fields registered.

Since these all have the same IDs right now (we determine which to put
into the page in the template), the elementID has been changed to a
selector. Along with this, since they all work on the same field in the
review request model, we're using an array of registered fields and not
a map (which we made no use of anyway).