MB-9516: Reset any undefined value to zero

Change-Id: I15e3c45b66eba99f8428379e7fdfc899f4d59908
Reviewed-on: http://review.couchbase.org/30271
Tested-by: Bin Cui <bin.cui@gmail.com>
Reviewed-by: Philip Labee <philip@couchbase.com>
Tested-by: Philip Labee <philip@couchbase.com>