Use a temporary process when caching shard maps
Use a temporary process when caching shard maps

This change introduces a new shard_writer process into the mem3_shards
caching approach. It turns out its not terribly difficult to create
thundering herd scenarios that back up the mem3_shards mailbox. And if
the Q value is large this backup can happen quite quickly.

This changes things so that we use a temporary process to perform the
actual `ets:insert/2` call which keeps the shard map out of mem3_shards'
message queue.

A second optimization is that only a single client will attempt to send
the shard map to begin with by checking the existence of the writer key
using `ets:insert_new/2`.

COUCHDB-3376

fkaempfer/couchdb,fkaempfer/couchdb,fkaempfer/couchdb,fkaempfer/couchdb,fkaempfer/couchdb,fkaempfer/couchdb