Handle ImproperlyConfigured when trying to load the S3 backend.

If django-storages is installed, but boto is not, it will raise an
ImproperlyConfigured exception when trying to do the import, which we didn't
catch. This caused the admin form to error out.

Testing done:
Removed the boto package from my site-packages and tried to load the file
storage settings page. When I selected "Amazon S3", saw the error message from
the exception.

Fixes bug 3062.

Reviewed at https://reviews.reviewboard.org/r/4463/
Fix alignment of the file attachment thumbnail overlay.

We put a clickable overlay on top of file attachment thumbnails, to ensure that
clicking anywhere within the area of the attachment will redirect to the review
UI (instead of selecting text or accidentally activating any links that might
be part of the thumbnail, e.g. for text file types). This overlay wasn't set to
have a left alignment of 0, so its left edge was aligned with the thumbnail
itself. This worked for some types (like text) but failed when we had
thumbnails that didn't stretch the full width of the box.

Testing done:
Verified alignment in Chrome and Firefox.

Reviewed at https://reviews.reviewboard.org/r/4475/
Add built locale files to .gitignore in release-1.7.x

We don't have any locale files in release-1.7.x, but the built .mo files may be
left over from when people were using master. Ignore them here, too.
Stop loading the non-existent 'attachments' tag bundle.

A recent change removed the 'attachments' template tag bundle, but the
template making use of it still attempted to call it. This didn't show
up on my system due to a stale .pyc file.
Build and ship compiled locale files.

This adds another compilation step to the egg build: locale files. We keep the
.po files checked in to git, but we don't want to check in .mo files because
they're big binary blobs that may change frequently, and git doesn't do so well
with that.

This requires that msgfmt from the gettext package is installed somewhere in
the path. On OSX, I've installed it via homebrew, but that doesn't add it to
the user path by default because of some conflicts.

Testing done:
- Built a .egg and installed it. Verified that both .po and .mo files were
  included in the correct location.
- Changed my PATH so that msgfmt could not be found. Saw the bdist_egg command
  error out.
Split RB.linkifyText into separate pieces.

The linkifyText method does a bunch of things. It starts out by escaping out <
and > characters (which doesn't have much to do with linkifying), and then
proceeds to create links for any full URLs, /r/### review requests, and bug
numbers.

When we integrate markdown support for text boxes, we don't want the <>
escaping, and full URLs will be handled by the markdown parser. We therefore
want to be able to call subsets of this functionality in addition to the whole.

Testing done: Ran js-tests
Reviewed at https://reviews.reviewboard.org/r/4489/
Make field formatters in ReviewRequestEditorView set the element's html.

ReviewRequestEditorView's field definitions have an abstract "formatter"
concept, which was a function that would mutate the value before setting it in
the DOM. This change moves the responsibility for calling jQuery.html() into
the formatter functions themselves. The motivation for this is that the coming
markdown changes will need to do some fancier stuff including accessing data
attributes on the element (to check if it should be formatted as rich text),
and setting the rich-text class once it's been formatted.

Testing done: Ran js-tests.
Reviewed at https://reviews.reviewboard.org/r/4490/
Fix up more PEP-8 issues.

This handles scmtools, site, ssh, and webapi subdirs, as well as the top-level
scripts.

Testing done: Ran unit tests
Reviewed at https://reviews.reviewboard.org/r/4473/
Rename scmtools.crypto to scmtools.crypto_utils

On case-insensitive file systems, the import of 'Crypto' inside
scmtools.crypto will fail. This problem also appears when attempting to
run Review Board inside a Linux Virtual Machine, where the code has been
shared from a Mac OSX Host. Since the default OSX filesystem is
case-insensitive, case-preserving, the import will fail as well.

Reviewed at https://reviews.reviewboard.org/r/4483/
Merge branch 'release-1.7.x'
Make linkifyReviewRequests and linkifyBugs produce markdown output.

This change adds a 'markdown' parameter to the review requests and bugs linkify
functions that enables them to produce output in markdown format (as opposed to
HTML).

While I was doing this, I noticed that writing "issue #2, issue #4" would
include the comma in the first bug number link. I've fixed the regex to handle
this case properly (commas are pretty unlikely to be part of a bug number), and
added a relevant test.

Testing done:
- Used this in conjuction with the markdown changes.
- Ran js-tests.

Reviewed at https://reviews.reviewboard.org/r/4491/
Make some CSS selectors more specific to avoid style bleed into descendents.

The list of replies to a comment on the review request page are arranged
semantically, using ul>li. Unfortunately, the reply-comments style bled through
to *all* li descendants of the top-level list, and not just immediate children.
This meant that when markdown formatting used a list (for actual lists, or the
way that it formats code samples), it would have all the junk used to display
the replies.

Similarly, a couple of the elements inside the change description banners at
the top of the page had loose selectors which caused styles to bleed into the
<pre> unnecessarily.

Testing done:
Saw that lists inside the .reviewtext and change description elements didn't
inherit a bunch of junky styles.

Reviewed at https://reviews.reviewboard.org/r/4492/
Fix the field name for changedescription in drafts.

The DraftReviewRequest model was trying to pull out "change_description" from
the JSON payload for the draft's change description, but the API field name is
'changedescription'. We didn't notice this because it wasn't actually used
anywhere (the change description was saved but never re-read).

Testing done:
- Ran js-tests
- Used this in conjunction with a change that adds a formatter to the
  changedescription field in the review request editor, causing the new value
  to be read when we save the draft.

Reviewed at https://reviews.reviewboard.org/r/4496/
Don't set an index on FileAttachment.repo_path.

MySQL has a rather low-ish limit for indexes on Unicode tables. We hit
that with the index for the new repo_path field.

This fixes the model and the initial evolution to not set an index. A
new evolution was added to fix the databases synced since the original
change, so that our state matches up, and otherwise will do nothing to
an existing database.
Add support for showing diffs of file attachments in the diff viewer.

Review UIs can now opt in to providing diffing functionality for file
attachments. A ReviewUI subclass that has supports_diffing=True will
have the whole width of the diff table to render in. It will be given
both the new file's fileAttachmentID, and the original's (as
diffAgainstFileAttachmentID).

FileAttachmentComment can now specify a FileAttachment that's being
diffed against. The ID for this can be set when creating a new comment
in the webapi.

FileAttachmentReviewUI will properly filter the comments when passing
down to the JavaScript to ensure only the comments matching that diff
range (or, if not using a diff, comments that are on a single
FileAttachment) are passed down.

It's up to the review UI to decide how to render the diff.