MB-7992: Fix race in get stats code path

If we check to see that the a stat is not zero and then there is
a context switch and the stats are reset then we can potentially
crash since because we might divide by zero. This change makes it
so that this isn't possible.

Change-Id: Icb0bf4864538823e3cd71749ecff7e3aad8ab220
Reviewed-on: http://review.couchbase.org/25411
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Tested-by: Michael Wiederhold <mike@couchbase.com>