CBIDXT-214 Copy Maps Between Components

Maps need to be copied when exchanged between components/functions.

As per golang documentation:
Like slices, maps hold references to an underlying data structure.
If you pass a map to a function that changes the contents of the map,
the changes will be visible in the caller.

Change-Id: Ifeea6202f998f8f1fcd9e9225a6e1f1960fa8b29
Reviewed-on: http://review.couchbase.org/41016
Reviewed-by: Deepkaran Salooja <deepkaran.couchbase@gmail.com>
Tested-by: Deepkaran Salooja <deepkaran.couchbase@gmail.com>