Deep copy db instead of shallow copy in fetchDB function
Deep copy db instead of shallow copy in fetchDB function

Change-Id: If51f2a8d7511fb2925023aaf01e7b233a27117b0
Reviewed-on: http://review.couchbase.org/102597
Well-Formed: Build Bot <80754af91bfb6d1073585b046fe0a474ce868509@couchbase.com>
Tested-by: Timofey Barmin <f30bdb2be8598fcffd705a378b25da4842d6bd7b@couchbase.com>
Reviewed-by: Aliaksey Artamonau <ce14b1c16e0fd654f926118eb8addbec5aff4ffa@couchbase.com>

couchbase/cbauth,couchbase/cbauth