[BP]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: I42074d7ae919dfd52cf193ff3e04f97457a7cb34
Reviewed-on: http://review.couchbase.org/25621
Reviewed-by: Michael Wiederhold <mike@couchbase.com>
Tested-by: Michael Wiederhold <mike@couchbase.com>
Merge remote-tracking branch 'couchbase/2.0.0' into HEAD

Change-Id: Ie7d8c066ef408aa51c178534dc0cc1d01f01499e