Fix issues with the new update_from_commit_id protection on 2.0.x.

A fix was recently added to prevent a failure when fetching a changeset
from creating a review request without a commit ID. This worked fine on
1.7.x, but the underlying code changed a bit on 2.0. On 2.0, we didn't
have a saved review request in the database before attempting all this,
and the new change broke saving of review requests completely.

The code has been reworked to perform the updating and validation early,
and to also associate the commit ID in the event of failure (in order to
allow it to more easily try again or at least look up the review request
later).

A number of unit tests for various conditions were added to help with
these cases and to also test for commit ID uniqueness.

Reviewed at https://reviews.reviewboard.org/r/6044/
Add better support for archiving repositories.

Archiving had issues before where an archived repository's path would
still conflict with a newly created repository. This confused a lot of
people using RBCommons, and required some manual work on our end to fix.

Now, we store a flag indicating that a repository is archived, and we
store the archived timestamp. The timestamp becomes part of the
unique_together for the path, preventing that from conflicting.

Reviewed at https://reviews.reviewboard.org/r/6043/