Add FileAttachmentHistory model and evolutions.

This change adds a model which is used to aggregate multiple FileAttachments
together into a single "history". This will be used by future changes for the
"Update" command, allowing users to replace attachments with new versions.

Testing done:
Ran evolutions.

Reviewed at https://reviews.reviewboard.org/r/6385/
Allow updating file attachments.

This change adds a new model, FileAttachmentHistory, which aggregates multiple
FileAttachments together into a single unit. Within a history, each file
attachment has a revision. Any "legacy" attachments will be associated with a
new FileAttachmentHistory when the review request page is shown. The history
also contains a "display_position" field, which may eventually be extended to
allow users to re-order the list of attachments on the page.

This also adds an "Update" button to file attachments in the "Actions"
drop-down menu. When clicking this, users will be presented with an upload
dialog allowing them to upload a new file. When a public attachment is updated,
it adds a new revision. When a draft attachment is updated, it is replaced with
the new file.

While I was adding tests and validation to the UploadFileForm, I did some
refactoring. The review request is now passed in as part of the constructor,
which aids in validation. Additionally, I've made it just use self.files (part
of the django Form class) instead of needing to pass in the file a second time
to the create() method.

Testing done:
- Loaded a review request with existing file attachments and saw that new
  FileAttachmentHistory entries were created for each one.
- Updated existing file attachments and saw that the new ones were created,
  visually replaced the ones that they updated, and that publishing the draft
  created the correct change description.
- Updated a file attachment multiple times without publishing the draft and saw
  that it replaced the new revision rather than creating multiple revisions.
- Checked a file attachment that had not yet been published and saw that it
  did not have the "Update" action.
- Ran unit tests.

Fixes bug 800.

Reviewed at https://reviews.reviewboard.org/r/6387/
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/
Merge branch 'release-2.0.x'