Fix js-tests.

Ripping out the startsOpen behavior invalidated some of the tests. I've removed
the special case tests and added a call to the generic editCountTests() method.
Trivial change.
Call success and update draft field when setting the close description.

The changeDescription field works kind of strangely when a review request is
closed. Rather than setting a field in a draft and asking it to save, it calls
close() with the new text. Unfortunately, the changeDescription field in
reviewRequest.draft was getting out of sync (since it wasn't updated), and the
success callback was never triggered. This fixes both those issues.

Testing done: Used in conjunction with my markdown change.
Reviewed at https://reviews.reviewboard.org/r/4504/
Fix ReviewBoxListView iteration over changedescs.

Our markup for change description boxes is a little weird, where we end up with
multiple nested elements with the 'changedesc' class. ReviewBoxListView was
iterating over everything with that class to set up the collapsable boxes,
which worked okay, but as soon as I tried to add something else to it, things
got weird.

This changes ReviewBoxListView.el to point to #content, and then iterates only
over the children.

Testing done: Used in conjunction with the markdown change.
Reviewed at https://reviews.reviewboard.org/r/4505/
Pull in 3rd-party libraries for markdown support.

This adds the latest versions of Google Code Prettify (a javascript syntax
highlighter) and marked.js (a markdown parser/renderer). These are not yet used
for anything, or even included in the pipeline definitions in settings.py.
Make long-form text entries use markdown formatting.

There are several places in Review Board where users can enter long-form text:
the review request description and testing done fields, comments, review body
top and bottom, and change descriptions. Until now, all of these have just been
preformatted text. This change integrates client-side markdown rendering for
these fields.

Because old text wasn't written with any feedback for what it would look like
as markdown, this functionality is gated for only new entries in the database.
A new boolean field called "rich_text" has been added to everything that could
potentially be rendered. The evolutions ensure that all the old models have
this set to false, and new ones will have it set to true.

The way this works on the client side is that fields in the HTML are annotated
with a data-rich-text attribute, which will be either true or false based on
the rich_text field in the model. The various views which use these have been
changed to call RB.formatText(), which will handle the hard work of formatting
the text using marked.js if appropriate, as well as handle the special stuff we
need to have it work with the inline editor.

The style throughout is done to keep things visually pretty close to plain
text, but with the nice benefits of emphasis, code samples, tables, lists, etc.
One extreme example of this is that the font size is consistent throughout,
even including headings.

One thing which is left to do for this is to render the markdown text for use
in HTML emails. I'm going to do that as a separate change because it's likely
to be pretty big itself, and I'll need to do some research on rendering
github-flavored markdown in python.

This change is based loosely on Greg Wang's change from
https://reviews.reviewboard.org/r/3892/

Testing done:
- Checked that old review requests/comments were not rendered with markdown.
- Tested using markdown syntax in each of the different rich text boxes.
- Tested that rendering occured for each box after page load, and that things
  re-rendered after the values were changed.
- Verified that bugs and review requests were properly linkified.
- Tried inserting HTML (especially <script> tags) and saw that it was escaped
  properly.

Fixes bugs 2093, 2098
Don't allow exceptions to bubble up when failing to fetch commits/branches.

It looks like sometimes the github API will return "not found". I'm not sure if
this is due to API outages or ownership issues (I haven't done too much
digging), but we should catch this case and log, rather than just letting the
failure bubble up to email Christian.

Trivial change.

Testing done: Ran unit tests.
LDAP: Use fully qualified DN for authentication

Use the fully qualified DN with LDAP bind for user authentication. Currently a
DN built with the base DN and uid is used. This did not work on our company
LDAP server.

Testing done: Code running successful with our company LDAP server.

Fixes bugs 2836, 3069
Reviewed at https://reviews.reviewboard.org/r/4488/
Merge branch 'release-1.7.x'
Exclude diff-associated FileAttachments from the resource list.

FileAttachments associated with a FileDiff shouldn't be shown in the
list of a review request's file attachments. Exclude them from the list.
A future change will add proper API for setting and getting attachments
on a FileDiff.

Also, while here, I added the missing mimetype field.
Fix all the current pyflakes warnings in the codebase.

This fixes all the warnings pyflakes have found so far. Nothing harmful.
It primarily consists of unused imports. However, it did prevent two
unit tests from running, due to duplicate function names.