Fix the state of the dashboard after refreshing.

The dashboard state was broken after its first load. The columns were no
longer interactive, nor was the Edit Column icon. The relative timestamp
columns showed absolute times.

We now set up the state again once we've completed a load.

Fixes bugs #2993 and #2994.
Merge branch 'release-1.7.x'
Fix an XSS vulnerability in the reviews dropdown.

The reviews dropdown had a bad vulnerability where it would assume the
user's full name is valid HTML. This allowed the user to craft a script
tag that would be executed every time the name appeared in the dropdown.

This vulnerability exists in 1.6.x, 1.7.x, and the in-development 1.8.
There are no known attacks in the wild.

This was reported by Craig Young at Tripwire.
Increase the max size of the timezone field.

The timezone field's max size was too small for the longest timezone
(America/Argentina/Buenos_Aires). The max size is now set to 30 to allow
for this.

Fixes bug #3005.
Reviewed at http://reviews.reviewboard.org/r/4230/
Fix an XSS vulnerability in the reviews dropdown.

The reviews dropdown had a bad vulnerability where it would assume the
user's full name is valid HTML. This allowed the user to craft a script
tag that would be executed every time the name appeared in the dropdown.

This vulnerability exists in 1.6.x, 1.7.x, and the in-development 1.8.
There are no known attacks in the wild.

This was reported by Craig Young at Tripwire.
Release Review Board 1.6.17.
Merge branch 'release-1.6.x' into release-1.7.x
Release Review Board 1.7.10.
Merge branch 'release-1.7.x'
Update the docs database for the latest schema changes.
Log useful output when the docs generation fails to find DB entries.
Fix unwanted saves when setting/getting ReviewRequest.commit.

ReviewRequest.commit behaved unlike any other attribute of a model.
Getting or setting it would trigger a save of the model.

This caused two problems.

First, we could end up loading a ReviewRequest and getting the commit,
triggering a save too early, and messing up state. The webapi docs
generation was impacted by this, and it led to failures.

Second, call sites that updated the commit and other properties resulted
in two database hits.

We no longer automatically save when setting. We still do migrate the
changenum to commit_id when getting, if needed, but we do it as an
atomic change in the database and not a full model save.
Remove a debug statement.
Fix the docs database to not have missing data.

The recent update to the docs database was broken due to the commit_id
early-saving problem. This restores from a previous commit and updates
for the commit_id schema.
Begin moving to new DiffReviewable/DiffReviewableView objects.

This forms the base of the upcoming diff viewer rewrite. The older
DiffReviewable has moved into diffviewer/models/, and its fragment
loading functions have been loaded to operate partly on state created
during instantiation, instead of taking that state as parameters.

DiffReviewableView is what all the rendering code for a given file's
side-by-side diff will be handled by. Right now, it just has the code
for finding a table row for a given line number. The logic for that code
has remained the same, but has some cleanups (line number parsing has
been factored out into a function and var statements have been moved to
the top of the function).

Future changes will move more of the diff viewer code into here, piece
by piece.
Move line commenting and chunk selection functionality into DiffReviewerView.

The majority of code that lived in $.fn.diffFile has been moved into
the new reviewable.

All the code that handles line selection is in a CommentDiffSelector
object, which listens for events on the diff reviewable's element.
This keeps the main reviewable much cleaner and easier to work with.
Add a mixin for registering key bindings.

KeyBindingsMixin makes it easy to map keys in a view to functions. Any
view using this mixin will listen for key presses matching any of the
keys listed in the View.keyBindings map, and call the appropriate
function.
Move diff reviewable setup and navigation/anchor selection out of diffviewer.js.

DiffViewerPage is now responsible for all keyboard navigation around the
diffs. It makes use of the new KeyBindingsMixin. It also owns anchor
selection, which (currently) both diffviewer.js and DiffReviewableView
make use of through a temporary RB.scrollToAnchor function.

DiffViewerPage also now sets up the DiffReviewableView for a loaded diff
fragment. This was tied closely enough to the anchor setup that it
seemed worth including in the same change.
Add diff viewer unit tests and fix some bugs.

This introduces unit tests for different parts of the diff viewer. This
right now covers hovering and selection (adding rows, removing,
finalizing with a comment, and more).

Some of the tests uncovered bugs. Particularly with removing rows from a
selection when selecting up and then down. These were long-standing bugs
that existed at least in 1.6. Those bugs have been fixed.
Disallow uploads via drag-and-drop for non-files.

The drag-and-drop support wasn't picky enough about what was being
dropped. It now requires files.

This also removes duplicate dragleave events.

Reviewed at http://reviews.reviewboard.org/r/4207/