Move some useful code for the diff viewer UI into central locations.

This takes some of the stuff from the diff viewer that my upcoming
text-based review UI change needs and moves them into more useful
places.

The lesscss definitions in diffviewer.less have been moved into
defs.less, making it easier to match up styles.

The multi-line comment selector for the diff viewer tables has also been
pulled out into a new RB.TextCommentRowSelector class, which other
review UIs can trivially use.
Add support for generic text-based review, and improve Markdown review.

This adds support for reviewing any kind of text-based file attachment.
The UI is much like the diff viewer. We present the file, syntax
highlighted, with line numbers on the side. Users can comment on a line
or on multiple lines at a time.

TextReviewUI and its JavaScript counterparts drive the whole review
process. They're also intended to be subclassable. The Markdown review
UI is now just a small subclass of TextReviewUI.

TextReviewUI and friends can optionally present the content both as
raw source text and as rendered content. The user will see two tabs when
rendered content is available, and can comment on each the source text
or the rendered text. Markdown makes use of this. In the future, we
could add simple subclasses for other formats, like XML or JSON files.

Since DiffCommentBlockView and TextBasedCommentBlockView are basically
the same, I've moved most of the logic into TextBasedCommentBlockView.
DiffCommentBlockView is now just a simple subclass.

There's also a few fixes for rendering thumbnails, extra data for review
UIs, and a couple new blocks to give custom review UI templates some
additional control.