Release Review Board 1.6.14.
Redo the look and feel of the admin UI.

I wasn't happy with the new boxy look of the admin UI that was part of
the new widget work. They're fine for widgets, but were too prevelant
throughout the UI.

This changes the UI to have a sidebar dedicated to the permanent admin
UI panes (settings, common database actions), and to have a single box
on the right for content.

Some of the pages weren't following the proper page structure for
settings pages, and have been changed to fit in correctly.

Some visual issues with the buttons like "History" and "Add user" have
been fixed as well.

I'm planning to make further tweaks to this going forward, but this is
probably more or less what we'll ship with 1.7.0.
Reload gravatar images in retina resolution if appropriate.

This pairs up with the implementation of $.fn.retinaGravatar() in djblets to
actually do the reloads when appropriate.

Testing done:
Checked the gravatars for the "My account" image in the upper right hand of the
page and the user infobox.

Reviewed at http://reviews.reviewboard.org/r/3556/
Implement Thumbnail Rendering for Text-ish File Attachments (.rst and .md)

Implemented thumbnail rendering for ReStructuredText (.rst) and MarkDown (.md)
file attachment types. The rendered thumbnails are displayed as HTML scaled down
by css (instead of rendered as image thumbs), and are mem cached.

Also changed the way MimetypeHandlers are registered to match existing
infrastructure for registering Review UIs, replacing the old way of doing it
through __subclass__

Testing done:
1. Ran unit tests for reviewboard.attachments.tests:

- Updated tests now all pass after adding setUp() and tearDown()
  to register / unregister the test Mimetype Handlers.

2. Manual testing on localhost:

Tested by uploading to a new review-request:
- raw .txt file
- raw .rst file
- raw .md file
- raw .jpg file
- raw .rst file with javascript injection
- raw .md file with javascript injection

Visual inspection of the rendered thumbnails all pass:
- Thumbnails appear immediately (without a refresh), reflecting
  latest feature updates to master.
- Scaling, cropping and rendering all appear to be correct.
- Javascript injection correctly escaped for malicious
  .rst and .md files

Reviewed at http://reviews.reviewboard.org/r/3454/
Fix errors when trying to download raw diffs with unicode filenames.

The filename field in the header would cause errors if the diff that was
uploaded had characters that weren't US-ASCII. This change adds an encoding step
that strips out any offending characters.

While I was in here, I changed the silly "bug%s" logic for filename fallbacks to
use rb-<id>.patch.

Testing done:
Created a diff named test𝄡.diff and uploaded it. Downloaded the resulting raw
diff and saw it try to save with a filename of "test.diff"

Fixes bug 2581
Merge branch 'release-1.7.x'
Enable and disable the commentDlg buttons when showing/hiding.

When the commentDlg was hidden, the buttons were still enabled. This meant that
if the input focus was set on those buttons and the user hit the "enter" button,
it would end up doing bad things. This change makes it so the buttons are
disabled when the dialog is hidden and enabled (if appropriate) when it opens.

Testing done:
Opened the commentDlg for both new and existing comments and saw the buttons
enabled or disabled as appropriate. Verified that typing into an empty input
field still enabled the "Save" button. Tested additional keyboard input after
closing the dialog and saw that my keystrokes were ignored as expected. Without
this patch, the bug reproduces.

Fixes bug 2775.
Reviewed at http://reviews.reviewboard.org/r/3561/
Fix review request caching when issue statuses change.

Our review request page's etags didn't take into account any state
changes caused by when issues were opened/closed. That's because we
didn't have anything we updated under those cases.

We're now repurposing the ReviewRequest.last_review_timestamp, which
was no longer used. This has been renamed last_review_activity_timestamp
in order to be a little more clear, and has a comment describing what it
takes into account.

Unit tests were added to make sure this doesn't regress.
Merge branch 'release-1.6.x' into release-1.7.x
Use lessc for building media, if available.

Our media building uses our bless service for compiling .less files to
.css. However, this isn't suitable for packaging on RHEL/Fedora/Debian.

We now check to see if lessc is available on the system, and use that
instead of bless. The packagers can then provide lessc as a build
dependency. It also makes for faster building of media.
Merge branch 'release-1.7.x'
Merge branch 'release-1.6.x' into release-1.7.x
Merge branch 'release-1.7.x'
Use lessc for building media, if available.

Our media building uses our bless service for compiling .less files to
.css. However, this isn't suitable for packaging on RHEL/Fedora/Debian.

We now check to see if lessc is available on the system, and use that
instead of bless. The packagers can then provide lessc as a build
dependency. It also makes for faster building of media.
Merge branch 'release-1.7.x'
Merge branch 'master' into slchen-xml_review_ui_extension
Fixed imports and added error handling

- Also added force_unicdoe on the read XML file