Actually delete repositories through the webapi when they're empty.

If you delete a repository through the API, it doesn't actually delete it, it
just "archives" it (sets it to be invisible and changes the name). The reasoning
behind this is that we don't want to break any existing review requests.
Unfortunately, if you then try to create a new repository with the same path, it
will fail due to the unique_together constraints. This keeps hitting users of
RBCommons, where the API is the primary way that repositories are
managed--what's happening is that users create a repository and as they're
trying to get things working, they delete it. They then recreate it and hit a
constraint error.

Instead of blindly archiving, we now only archive if we actually have review
requests to preserve. This doesn't fix every possible case (maybe someone
created a test review request and then deleted the repository) but it should
handle most of the failures I've seen so far.

A better fix would be to do constraint checking by hand and only test for
uniqueness among visible repositories, but that involves schema changes.

Testing done: Ran unit tests. Verified that a DELETE call did what I expected.
Reviewed at http://reviews.reviewboard.org/r/3880/
Merge branch 'release-1.6.x' into release-1.7.x
Fix overzealous caching in admin dashboard widgets

The widgets in the admin dashboard cache their data in order to avoid doing
somewhat expensive computation every time the dashboard is loaded.
Unfortunately, this was a little too aggressive and didn't update correctly when
Repository or Group objects were created or deleted.

This change adds a "sync number" to the cache key, which is incremented whenever
one of the relevant models changes.

Testing done:
I check the Admin Dashboard after add a repository, then I can see correct data
on Repositories widget.

Fixes bug 2753.
Reviewed at http://reviews.reviewboard.org/r/3780/
Fixed error that failed to display user-not-found text in red error box.

When non-existant people or groups were entered into the review request target
reviewers fields, the error box didn't show the text correctly.

Testing done:
1. Incorrectly inputted into Group field - error appeared with text.
2. Incorrectly inputted into People field - error appeared with text.

Fixes bug 2869.
Reviewed at http://reviews.reviewboard.org/r/3756/