MB-9693: Dump keys by memcached errors in XMem
MB-9693: Dump keys by memcached errors in XMem

It is to help ep_engine diagnosis hard bugs where remote memcached
returns unexpected errors. Today we make a list which includes all
keys with memcached errors. It turns out ep_engine is more interested
in some of them like enoent than others like not_vb_bucket, which is
totally expected during topology change.

This commit categories all keys by their error type, and dump them
separately. Also, it only dumps at most 10 keys for each type of error
for diagnosis to avoid spam logs with error keys. For example, during
an active replication, topology change may generate thousands of keys
dumped to logs due to not_my_vb error.

Change-Id: I5127461af0b450090bbfc65d0992384373384e7d
Reviewed-on: http://review.couchbase.org/31023
Reviewed-by: Junyi Xie <cec9b1c9f34a8d92cba938f3f3364d5120580782@gmail.com>
Tested-by: Junyi Xie <cec9b1c9f34a8d92cba938f3f3364d5120580782@gmail.com>

t3rm1n4l/ns_server,t3rm1n4l/ns_server,t3rm1n4l/ns_server,nimishzynga/ns_server,ceejatec/ns_server,daverigby/ns_server,nimishzynga/ns_server,ceejatec/ns_server,ceejatec/ns_server,mschoch/ns_server,membase/ns_server,daverigby/ns_server,mschoch/ns_server,membase/ns_server,ceejatec/ns_server,daverigby/ns_server,nimishzynga/ns_server,membase/ns_server,mschoch/ns_server,membase/ns_server,t3rm1n4l/ns_server,nimishzynga/ns_server,mschoch/ns_server,daverigby/ns_server,ceejatec/ns_server,membase/ns_server,daverigby/ns_server,mschoch/ns_server,mschoch/ns_server,nimishzynga/ns_server,nimishzynga/ns_server,ceejatec/ns_server,membase/ns_server,t3rm1n4l/ns_server