MB-22163: Use get_if to fetch items for mutations
MB-22163: Use get_if to fetch items for mutations

Reintroduce the get_if patch for mutations. It had to be
reverted due to ep-engine returning KEY_EEXISTS for locked
items instead of ENGINE_LOCKED (I thought I had fixed that,
but it turned out that was pending).

commit badccafaa2e670719c181a9ff39ffa2add5e19d6
Author: Trond Norbye <trond.norbye@gmail.com>
Date:   Thu Mar 9 07:48:36 2017 +0100

    MB-22163: Use get_if to fetch items for mutations

    The mutations _might_ need to preserve the xattrs from
    the previous version of a document so we want to retrieve
    only the documents which already contains xattrs.

    The motivation for moving to get_if instead of get is
    that the underlying engine may provide the metadata to
    the callback without having the actual value for the
    document in memory (whereas get() would require the
    engine to fetch the document off disk). This would
    result in a significant performance improvement in
    DGM situations where we're running with value eviction.

    For full eviction we must go to disk anyway.

Change-Id: I4c726e717b0351afaa6bb7a22c3ee8ce2d6e1629
Reviewed-on: http://review.couchbase.org/75143
Tested-by: Build Bot <80754af91bfb6d1073585b046fe0a474ce868509@couchbase.com>
Reviewed-by: Dave Rigby <a09264da4832c7ff1d3bf1608a19f4b870f93750@couchbase.com>

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