Fix review-requests/ resource to catch diff related errors.

There were several diff parser related exceptions that weren't being handled in
the review requests resource, which would cause a 500. This change catches
those errors and translates them into equivalent API errors.

Testing done: Ran unit tests.
Reviewed at https://reviews.reviewboard.org/r/4754/
Centralize much of the comment API update/create code.

Most of the comment create/update code was duplicated, and some fixes
were missing from places. That code has now been centralized, making it
easier to maintain and to update.
Support the new static bundles for extensions.

This updates to support the new static bundles for extensions. The
appropriate template tags have been placed in the base template, so that
the default bundles will be loaded.

There's also a new reviewboard.extensions.packaging module, which
contains a setup function that an extension's setup.py can use in place
of the standard setuptools one. This will set some required options for
the package, and set things up to install static bundles.

The documentation and extension generator have been updated.
Support static media bundles in review UIs.

ReviewUI now has css_bundle_names and js_bundle_names variables, which
specify static media bundles that will be loaded in when displaying the
review UI. This makes it easier to write a Review UI without having to
use a custom template to include the required files.

Extensions can use Extension.get_bundle_id to pass in bundle IDs for a
review UI, but it must do it in the ReviewUI's __init__ function, or
patch the class in the Extension's __init__, as the extension IDs (and
therefore bundle IDs) are computed once an extension is enabled and
constructed, not when defining the classes.