Fix review request fields on Local Sites.

Review request fields were breaking on Local Sites. One case involved an
invalid variable name (review_request.local_site_name), and the other
never passed a LocalSite to local_site_reverse.

This fixes both cases.
Fix allowing admins to reopen discarded review requests.

Due to a bad conditional, it wasn't possible for an admin (or user with
the appropriate permissions) to reopen a discarded review request. This
worked for submitted review requests, but not discarded.

The conditional now includes the permission check.

Reviewed at https://reviews.reviewboard.org/r/6144/
Merge branch 'release-1.7.x' into release-2.0.x
Remove some duplicate code from a merge in rb-site.

Some code from a backport of an rb-site change to 1.7 got merged back
into 2.0, causing a duplicate function and unused import. This removes
that code.
Handle all errors when checking if a diff dedup is needed on upgrade.

We were checking if an OperationalError was thrown when checking if a
diff dedup was needed during upgrade. Turns out, ProgrammingError can
also be thrown. We may find that more errors could be thrown in the
future.

We unit test that the unmigrated() function works, and Django's count()
should always work. So, trusting that, we're now just catching all
exceptions, instead of white-listing several exceptions. This will help
protect from new errors in the future (depending on database), and
ensure that the user will always be able to get through this (very
unimportant) part of the upgrade process.

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