Wait for rexi_server before adding a node

The race condition between a nodeup event and rexi_server starting was
causing some superfluous errors. This just waits for rexi_server to boot
before notifying mem3_sync_nodes.
Relax the mem3_sync_security fix constraint

Instead of requiring that we only have an empty security object and a
single non-empty version that out numbers empties, we relax the fixable
constraint to be a single simple majority of (N/2)+1 objects of a single
value.

BugzId: 11602
Check security objects during internal replication

If we detect that two shards have different values for a security object
during internal replication we automatically trigger a security object
synchronization.

BugzId: 11602
Explicit zone placement
Remove cruft
Placement is always specified as a string
Merge pull request #34 from cloudant/explicit_zone_placement

Explicit zone placement

BugzID: 14920
Merge pull request #33 from cloudant/11602-sync-security

BugzID: 11602
Don't resurrect shards on deletion

In bigcouch and bigcouchplus (at least) the deleted property is a
binary, <<"deleted">>, and not an atom, deleted, as it used to
be. This causes mem3_shards to recreate a shard immediately after it
is deleted, leading to profound silliness.

BugzID: 15924
Merge pull request #35 from cloudant/15924-dont-resurrect-on-delete

Don't resurrect shards on deletion
Protect against cache_hits on non-existant entries

This can happen if we load a shard set from the cache and then eject the
shards before processing the cache_hit '$gen_cast' message. Instead of
trying to be fancy and reinserting the shards into the cache directly we
just rely on the fact that they'll be reinserted normally on the next
request.
Merge pull request #36 from cloudant/13605-fix-shards-badmatch

Protect against cache_hits on non-existant entries

BugzID: 13605
Replace cache miss log with metrics

This also adds metrics for cache hits and evictions as well as the miss.
Add an API for mem3_sync queue lengths
Merge pull request #39 from cloudant/15754-mem3-sync-backlog

Add an API for mem3_sync queue lengths

BugzID: 15754
Merge pull request #38 from cloudant/17185-reduce-log-spam

Replace cache miss log with metrics

BugzID: 17185
Use config app instead of couch_config

BugzID: 13179
Updated the tests too
Merge pull request #40 from cloudant/13179-refactor-config-registration

Use config app instead of couch_config
Ignore other config changes