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/