Add management commands for enabling, disabling, and listing extensions.

When things go wrong with extensions, it's difficult to solve without
going into the database. This change aims to help with that by offering
management commands for enabling and disabling extensions, and for
listing all available (or all enabled) extensions.

'enable-extension' and 'disable-extension' take an extension ID, and
will enable or disable.

'list-extensions' will by default list all registered extensions.
Passing --enabled will limit this to enabled extensions.
Streamline rb-site install.

Many of the options rb-site install presented were advanced options that
a new admin likely didn't need to deal with. For example, the static and
media URLs, web server, Python loader, and the option for file-based
caching.

In order to simplify the first-time install experience, these wizard
pages have been hidden behind an --advanced flag, leaving only the
options that most users will need to deal with.

We also don't want to support mod_python anymore, so this has been
removed entirely.

In total, this takes us from 13 wizard pages to 8.
Allow continuing when hitting a DB sync error in rb-site.

A problem people sometimes hit is forgetting to create the Review Board
database or setting the right permissions before they proceed with
rb-site install. This can lead to a failure when synchronizing the
database, and then the need to delete the site directory and start over.

We now present a helpful error with the ability to continue and try
again as many times as needed.

Fixdes bug #2126
Switch to the HTML5 DTD.

We were using the XHTML 1 Transitional DTD for the longest time for
Review Board. This ends up putting the browsers into a mode where
some of the more recent rules won't apply. For the most part, we're
unaffected by any of these quirks, but I ran into something I was
working on where this did matter. It's also more likely to impact us in
the future.
Attempt to make directories writable on rb-site upgrade.

When upgrading an existing site, there should be at least one directory
("uploaded") that is writable by the web server. We can use this as a
reference point for all other directories that need to be made writable.

We now stat that directory and change ownership of all the other
directories.

I've also added uploaded/files as a generated directory. Technically,
this can be created on-the-fly, but since we know we want it, and make
the other directories, we may as well make this one up-front.
Allow passing a custom LocalSite to TestCase.create_review_group.

TestCase.create_review_group now accepts a local_site= parameter for
specifying a specific LocalSite to create a Group against. This is being
used in RBCommons, and may be useful down the road in RB.
Bump to 2.0 RC 2 dev.
Don't check for the static/ext/ directory in DEBUG mode.

When running in DEBUG mode, the manual update checks were checking for
htdocs/static/ext/, but adding this would cause problems, since we don't
want a htdocs/static/ in a dev install.

We now only make this check if not running in DEBUG mode.

Reviewed at https://reviews.reviewboard.org/r/5668/
Optimize querying with private review requests.

When querying lists of review requests that contained private review
requests, the query ended up joining enough tables where the query could
take a substantial amount of time to execute.

This change optimizes the query by pulling out a couple of the more
expensive joins into a couple simple queries. The result is a much
faster query.

Reviewed at https://reviews.reviewboard.org/r/5669/
Merge branch 'release-1.7.x' into release-2.0.x
Merge branch 'release-2.0.x'