Calculate stats dynamically instead of using side counters

Side counters are error-prone, and there are cases where they can
get out of sync if we lose a connection to the DB at the wrong
moment. Also, they are difficult to update when performing GC
operations.

This patch mostly removes the use of counters to track stats and
does the calculations on the fly. These calculations should still be
quite fast, since we are still using a per-claim counter (which
is easier to maintain than the per-queue counters).

Change-Id: I5d63a3791afd8d749890c5996208568c974f71d1
Partially-Implements: blueprint redis-storage-driver
Merge "Calculate stats dynamically instead of using side counters"