Ref count connections in the mock server like we do in memcached

It's possible for an upr connection to call notify io complete in
a test case after we have destroyed the cookie. If this happens
then the test will crash. As a result we should ref count
connections in order to properly release them just like we do
already in memcached.

Change-Id: I284ede9facea87de94910f3315f6c6791473f363
Reviewed-on: http://review.couchbase.org/36655
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>