MB-9471: add atomic replace operation

Add an atomic replace operation

Change-Id: I3fa454301ac3745d960dbef0295996161ee1a8dd
Reviewed-on: http://review.couchbase.org/39109
Reviewed-by: Michael Wiederhold <mike@couchbase.com>
Tested-by: Sriram Ganesan <sriram@couchbase.com>