Support copying text from columns in the diff viewer.

This adds support for selecting text within a column of the diff viewer
or the text file review UI and copying it to the clipboard.

Browsers do not have any sort of support for confining a selection
within a column of text in a table. The few UIs out there that implement
this instead have a div per column, and do tricks like turning off line
wrapping or cutting off text in order to keep rows lined up. Not good
enough for us.

CSS does offer a way of turning off selection for an element, but all
browsers get it terribly wrong. Chrome will limit the visible selection,
but actually select all elements in-between (including other columns),
ignoring what's presented as the selection. Firefox does the inverse,
showing all as selected but only selecting the ones allowed to be
selected (with the added problem of selecting all whitespace that's in
the HTML, even if they're irrelevant to the output).

The good news is, with some cleverness, it turns out we can do
column-based selection sanely across platforms.

On MouseDown, we record the column, with the intent of limiting the
selection to that column. We then set a CSS class that contains the
column index. CSS rules unset selection for all other columns but the
active one, and turn off the selection background (for Firefox).

When the 'copy' event is fired (when the user triggers Copy), we have
the ability to manipulate the clipboard on modern browsers. We grab the
selection range, and extract the contents to a DocumentFragment. We can
then traverse the rows, extract the relevant columns, and build strings
ourselves, which are then set as the clipboard contents.

This gives us smart column-based copying on all modern versions of
Chrome, Firefox, and IE.

Fixes bug #1094
Reviewed at https://reviews.reviewboard.org/r/6435/
Prevent HTTP 500 errors when failing to generate a thumbnail.

If a file for a file attachment is not found when generating a
thumbnail, an exception is raised that bubbles up, resulting in a HTTP
500 error. Now, we catch that error as part of the other operations we
were sandboxing, log it, and return an empty string instead of bubbling
the error up.

Reviewed at https://reviews.reviewboard.org/r/6434/
Improve performance for MarkdownEditorView.

MarkdownEditorView was listening to some frequently-emitted signals on
CodeMirror, performing calculations, and then emitting its own signals.
This ended up taking enough time that it led to a slowdown of text
input, making the input feel sluggish.

We now throttle the events. Viewport changes are limited to one every
250ms, and change events are limited to one every 500ms.

The result is that the widget went from sometimes sluggish performance
to near-native (though this will likely still depend on how overloaded
the browser is and what the page is doing).

Reviewed at https://reviews.reviewboard.org/r/6427/
Preserve query args when redirecting from Review/Reply draft resources.

The Review/Reply Draft resources redirect to a resource with the
appropriate ID, but when doing so, they don't preserve any query string
arguments. This means that if something like ?api_format or
?force-text-type is used, it will be lost.

We now have a useful utility function for building a URL that preserves
all query string arguments that aren't automatically preserved by the
base WebAPIResource. These are used in all two resources that do a
redirect from a GET.

Reviewed at https://reviews.reviewboard.org/r/6437/
Support including raw text fields in the API when using force-text-type.

The force-text-type= parameter in requests is useful for returning text
in a different format, but there are times when the client would need
the raw text along with this.

Now, the client can also send an include-raw-text-fields=1 parameter,
which will embed a 'raw_text_fields' dictionary in the object's payload
containing an entry for each text field. Each entry provides the raw
version of the text. This is optional, in order to prevent the default
response from ballooning in size.

On an implementation level, this is done by removing all the custom
serializers, and instead adding some metadata to the resource's fields
list for each field that supports text types. MarkdownFieldsMixin's
serialize_object then handles embedding these raw fields in the payload
on request.

Reviewed at https://reviews.reviewboard.org/r/6436/
Remove marked.js and google-code-prettify.

Now that we no longer render Markdown client-side, we have no need for
either marked.js or google-code-prettify. This change removes them.
Fix some issues that were breaking javascript in firefox.

This fixes a regression introduced when marked.js was removed. Apparently
testing global names to see if they're defined doesn't work so well in firefox.
This broke pretty much all javascript everywhere. Fortunately, we don't care
about setting any marked.js options anymore, so this can just go away.

This also fixes a missing semicolon.

Testing done:
I can edit things on review requests again.

Reviewed at https://reviews.reviewboard.org/r/6440/