Pluggable UI handler matching now supports file extensions

Rather than just relying on mimetypes to match an attachment to a
Pluggable UI, we can now use file extensions to determine the
Pluggable UI for an attachment.

This allows us to override the mimetype when mimeparse detects the
mimetype for an attachment to be "octet-stream".
Addressed issues from code review

Addressed concerns brought up in code review for r/3434 and r/3526.
These changes will be rebased on to the "lightbox-pluggable-ui" branch
as well.
Functionality to fetch rendered file attachment

Added functionality to render file attachment and return the rendered
HTML as plain-text so it can be dynamically added to the DOM on the
frontend.

Each Review UI can now set a 'urlpatterns' property. Each URL pattern
that is set for any review UI gets appended to the URL patterns in
reviews/urls.py and hence gets handled by Django when the URL is
accessed.
Display modal box when "Review" is clicked for a file

When the "Review" link is clicked for any file attachment, an AJAX
request is done to fetch the rendered HTML. On success, the rendered
HTML is now shown in a modal box.
Addressed issues from review request (r/3526)

Several issues are now addressed:
* Modal box title is now caption (if available). Falls back to filename.
* Several PEP8 issues (mostly adding blank lines)
* Renamed "review_ui_urlpatterns()" to "get_urlpatterns()"
* Removed "url" prefix from urlpattern
* Moved "Review" modal box handler code to a more appropriate event
  handler. However, more work needs to be done on this.

Additionally, several changes were made to the parent branch
(markdown-ui) and they were rebased on this branch. The changelog can be
viewed at http://git.io/IK-drw.
Removed unneeded functionality from MarkdownUI

Made the following changes to displaying review UI a in lightbox window:

- MarkdownReviewUI doesn't need custom urlpatterns. Those will only be
  used for certain ReviewUIs that need to dynamically fetch content from
  the server.
- MarkdownReviewUI now sets 'allow_inline' to be true. This allows it to
  be shown in a lightbox window from the review request page.
- showReviewUI() queries "?inline=1" and displays the returned data.
  More work needs to be done on this.
Strip down inline template

Instead of extending base, we only load and include as few things as
possible to strip down the inline template. This results in only
including the generated HTML, custom Javascript and required JS
libraries.

Additionally, refactor the showReviewUI() code to use $.get shorthand
instead of $.ajax to make code shorter.

Overall, this commit helps loading review UIs inline in a lightbox
window by only fetching the HTML that is required rather than an entire
HTML page.
Strip down inline template and fix modal box popup

- Remove unneeded scripts being included in the base inline template;
  these shouldn't be included since they should have already been loaded
  in the DOM when this is called.
- modalBox's dialog needed an "appendTo" to make it work for scripts
  embedded in the HTML
Addressed issues from code review

Addressed issues from http://reviews.reviewboard.org/r/3526/:

- We are now using DynamicURLResolver() to support extension URL
  patterns
- URL patterns are now added/removed on registering and unregistering.
  get_urlpatterns() simply returns the list of patterns so far. This
  makes getting URL patterns a constant time operation rather than a
  linear.
- Various stylistic and style changes