Make crypto_utils backwards compatible with python-crypto on CentOS 6.4

CentOS ships an older version of pycrypto by default, with the newer version
only available in EPEL. This change makes Review Board work with either.

Testing done: Was able to get ReviewBoard to work on CentOS 6.4

Reviewed at https://reviews.reviewboard.org/r/4769/
Fixes bug 3110
Add "Rich Text" fields in the administration UI.

This updates the admin UI forms for a few objects to provide "Rich Text"
fields. All the comments already have them, but these objects (Review,
ReviewRequest, ReviewRequestDraft) are all customizing the displayed
fields, and so need to explicitly provide them.
Format Markdown text for file attachment and screenshot comments.

Only diff comments were formatting Markdown text. Other comment types
ignored it completely and assumed it was plain text. Now it works for
all comment types.
Expose the 'rich_text' field for reading in the API, and doc it.

Clients using the API had no idea whether the text contents for various
resources were in plain text or Markdown. We now expose the rich_text
field for these resources, and document it in the resource description.
Load the richText field in several resource models.

Now that the richText field is added, load it in when parsing payloads
for the appropriate models. Currently, this is not used for anything
but information.

Unit tests were added for these fields.
Make the Markdown styles consistent with the source text.

The Markdown styles no longer jump nearly as much when going from
editing to viewing. The text aligns nearly everywhere except when there
are non-visible Markdown formatting characters, like * or `.

The CSS we use for the diff viewer syntax highlighting is now being used
for source code in Markdown, which replaces prettify.css.

Also, in general, styles are just a bit cleaner and more tightened.

Due to some strange bugs in Firefox with its textarea, where things are
off by 1px in places, some Firefox-specific CSS rules had to be added to
compensate.
Bump the minimum version of some of our dependencies.

This bumps the Markdown, Paramiko and Pygments dependencies to their
current released versions. We were allowing for much older versions,
which creates too big a potential support burden. These releases have
numerous bug fixes and feature additions that may be useful as well.
Fix updating the favicon when there's a notification.

The rewritten code to update the favicon for notifications never worked.
This was due partly to invalid variable names, and partly due to using
the wrong 'rel' attribute.

Now, the favicon updates properly when there's a notification, and
reverts when clicking Ignore.
Reorganize the list of resources in the webapi docs.

The webapi docs had a flat, alphabetical list of resources, which wasn't
that easy to navigate. This was especially true since we had things like
"file attachment comments," "review file attachment comments," "review
reply file attachment comments," etc.

Now, all resources in this list are grouped by sections, making it much
easier to locate a particular category of resources and to see how they
relate.

It also deletes file-attachment-comment, which isn't even really a
resource and should never have been there (since the list for that
resource forwards on to the an instance within the parent review in the
tree).
Fix review requests becoming private after discard, reopen, close.

When marking a review request as discarded and then reopening, we force
the user to complete a draft and publish it, since the typical reason
you discard is that you've thrown away the review request, and reopening
means you're starting over on some aspect of it.

Sometimes, the discard is accidental, and a user will fix this by just
closing it again as submitted. Unfortunately, the act of reopening marks
it as not public, and that state remains when marking as submitted.

We now mark a review request as public if it's closed as submitted.

Fixes bug #3103
Merge branch 'release-1.7.x'
Fix Garrett Cooper's name.

Sorry, Garrett!
Merge branch 'release-1.7.x'
Fix prepare-dev.py to not link djblets static media

Now that djblets is fully pipeline-ized, we don't need to create the static
media symlink. This was extra broken, because djblets/media doesn't exist
anymore, so new users trying to use prepare-dev.py would just get an error.

Reviewed at https://reviews.reviewboard.org/r/4812/
Document extension API resources.

Extensions could add their own resources to the WebAPI, but this was never
documented. I've added a sample of this that looks a lot like Review Bot's
review resource, but simplified quite a bit to eliminate a lot of the actual
guts, leaving only a shell of a resource.

Testing done: Generated HTML docs.
Reviewed at https://reviews.reviewboard.org/r/4818/
Switch to using allowed_mimetypes in webapi resources.

The allowed_item_mimetypes and allowed_list_mimetypes were deprecated in
Djblets 0.6, but a few of our resources still use them. They'll be nuked
from Djblets soon, so I've updated our code here to no longer use them.
Remove positional and unnecessary arguments on get_queryset calls.

A number of API handlers were passing positional arguments to
get_queryset, such as the review_request_id. Most of these arguments
weren't even necessary to explicitly pull out of kwargs and pass, since
we're passing kwargs directly.

The problem with positional arguments in these calls is that things get
messed up if a get_queryset or get_object implementation wants to
declare some other parameter before args and kwargs. The wrong value
would get passed for the wrong argument.
Rewrite the documentation for selecting diff revisions.

Our nice new revision selector UI is hopefully pretty self explanatory, but all
the same, we should document it. The nice thing about this new UI is that it's
much easier to explain how to choose an interdiff.

Testing done: Generated HTML docs.
Reviewed at http://reviews.reviewboard.org/r/4783/
Make use of the new web API optimizations in Djblets.

This helps the new optimizations for the Djblets web API code. It calls
the new _get_queryset, and makes use of the new id_field in get_object.
Fix a breakage with interdiffs.

The new interdiff code had a few occasions where it'd miss chunks. It
didn't actually miss them, it just miscategorized as equals.

The reason it did this was that it was attempting to figure out the next
range to consider after figuring out if a chunk was valid, and was only
considering the very next range. What it didn't consider was that there
may be a handful of ranges it should be skipping over that are equal
between the interdiffs, and that it may need to figure this out before
determining if a chunk is valid

This fixes the broken interdiff noticed on
https://reviews.reviewboard.org/r/4257/.

A unit test was added for this case.