MB-20836: Grab lock for get_number_of_mock_cookie_references
MB-20836: Grab lock for get_number_of_mock_cookie_references

Acquire ref_mutex when accessing 'references' attribute
of a mock cookie object.  This is to avoid a data race
between releasing a mock cookie object, whilst another
thread is reading the number of references of the same
mock cookie object.

Change-Id: I2bb00118e55d8f968fecd76eb7135912902c81ce
Reviewed-on: http://review.couchbase.org/67544
Reviewed-by: Dave Rigby <a09264da4832c7ff1d3bf1608a19f4b870f93750@couchbase.com>
Tested-by: buildbot <80754af91bfb6d1073585b046fe0a474ce868509@couchbase.com>

couchbase/memcached,daverigby/memcached,daverigby/kv_engine,couchbase/memcached,daverigby/memcached,daverigby/kv_engine,daverigby/kv_engine,daverigby/memcached,couchbase/memcached,couchbase/memcached,daverigby/memcached,daverigby/kv_engine