Fix initial state of "Download Diff" vs. "View Reviews"

The code to initially hide the "Download Diff" link for interdiffs got messed
up due to a merge-o, and the result is that it was hiding "View Reviews"
instead.

Reviewed at https://reviews.reviewboard.org/r/5592/
Fix a bunch of jshint errors, generalize tests.

This change fixes a bunch of errors found by jshint. Most of these are silly
things like missing semicolons. This also changes our use of 'public' to
always use string notation, so that we're not using a reserved word.

When I was running the js-tests, I found that different browsers used different
orders for attrs which had been added from javascript when calling .html().
This meant that several of our field tests broke when running in firefox. I've
changed this to test more generally instead of looking for specific html
strings.

Testing done: Ran js-tests.

Reviewed at https://reviews.reviewboard.org/r/5595/
Change _.super to _super.

"super" is a reserved word as of ES6. This makes jshint very unhappy. This
change fixes up all our call sites to call it "_super" instead. Once this is in
I'll push a trivial change to rb-extension-pack to update its use of _.super.

Testing done: Ran js-tests and jshint.

Reviewed at https://reviews.reviewboard.org/r/5600/
Split up _find_review_request to retrieve the ReviewRequest object, then check permissions.

Currently, `_find_review_request` retrieves the ReviewRequest object matching an
ID and checks permissions, returning `None` if the review request is not
accessible by the user. Splitting this up into two parts (retrieve the
ReviewRequest object first, then check for permissions) allows us to get a
ReviewRequest object in cases where permissions are not needed.

Testing Done:
- Manually checked that the review request details page shows up.
- Ran unit tests.

Reviewed at https://reviews.reviewboard.org/r/5603/
Implement drag and drop on admin site (back end)

The user can now customize their dashboard by dragging and dropping widgets to
move them around.

Testing Done:
I opened Review Board on two different browsers, Chrome and Firefox, and logged
in as the same user on both browsers. On the Chrome browser, I visited the
admin dashboard and changed the ordering of the widgets with drag-and-drop. On
the Firefox browser, I also visited the admin dashboard, and I checked to make
sure that the positions of the widgets were the same on both browsers,
indicating that the positions had been saved on the back end side.

Reviewed at https://reviews.reviewboard.org/r/5528/
LDAP: Handle upgrades from 1.7.x

The new LDAP configuration is much better, but it broke when upgrading existing
configurations from 1.7.x. This change adds some migration for old settings.

Testing Done:
Configured LDAP with ReviewBoard 1.7.21, then upgraded to ReviewBoard 2.0rc1
with this patch.

Also tested manually editing the siteconfig_sitconfiguration database table to
verify that it was properly updated on ReviewBoard start-up.

Reviewed at https://reviews.reviewboard.org/r/5605/
Handle the inability to load the siteconfig better.

My changes to automatically apply https based on the siteconfig made the
experience a bit worse when there was a problem loading said siteconfig. The
major problem was that load_siteconfig() would return silently if there was
some unexpected error. This wasn't a huge issue before, but now that we have
middleware that needs the siteconfig to load, it was showing me at
AttributeError for NoneType.

I've added some logging to load_siteconfig, and changed the middleware to pass
through if it couldn't load.

Testing done:
Tried to run my devserver against a mysql server which wasn't running. Saw the
error in the log about loading siteconfig, and saw that instead of getting a
weird AttributeError in my browser, I saw an error about the sql server.

Reviewed at https://reviews.reviewboard.org/r/5604/
Improve testing infrastructure reusability for the web API.

The testing infrastructure was fine for the Review Board API tests, but
wasn't as nice to work with for anything else that wanted to reuse the
test infrastructure. In particular, the assumption was made that all
APIs can be bound to a Local Site, but this isn't always true.

This assumption has been removed. The default is still to test APIs
against a Local Site, but by setting `test_local_sites = False`, this
will be turned off.

Along with this, create_repository() can now accept a `local_site=`
parameter, and subclasses of BaseWebAPITestCase can now override the
mimetype for expected errors.