MB-8846 Use std::set instead of unordered::set.

The current mingw build env doesn't support unordered::set.

Change-Id: Ib4c6e635015ff464442430e138169d1fb067b063
Reviewed-on: http://review.couchbase.org/28257
Tested-by: Bin Cui <bin.cui@gmail.com>
Reviewed-by: Chiyoung Seo <chiyoung.seo@gmail.com>
MB-8828: Check memory condition before returning enomem for withmeta ops

If we run into a memory condition when we are trying to put something
into the hashtable then we return enomem even though we might actually
be able to free memory. This change makes sure we check the memory
condition before actually returning an error code.

Change-Id: I3d10641764653c971aaeb9e8089fb21fe891a699
Reviewed-on: http://review.couchbase.org/28269
Reviewed-by: David Liao <david.liao@couchbase.com>
Reviewed-by: Chiyoung Seo <chiyoung.seo@gmail.com>
Tested-by: Michael Wiederhold <mike@couchbase.com>
MB-8825: Add stat to keep track of conflict resolution fails

This stat will help with xdcr debugging

Change-Id: Ie2ea77f51f40581ab60c823cf40c5276b4e27845
Reviewed-on: http://review.couchbase.org/28271
Reviewed-by: Chiyoung Seo <chiyoung.seo@gmail.com>
Tested-by: Chiyoung Seo <chiyoung.seo@gmail.com>