Merge remote-tracking branch 'origin/branch-18' into master

* origin/branch-18:
  questionable: tcpnodelay for ebucketmigrator sockets
  deactivate node now marks it as failed over
  ask memcached to die real quick on failover
  allow port_servers to send arbitrary data to port's stdin
  unbreak warmup completion detection
  made supervisor_cushion exit with same reason as child
  Implemented synchronous rebalance stopping
  log planned moves instead of vbucket map
  delete old copies of vbucket after vbucket movemenet
  deregister tap names after using them for building replicas
  backfill all new replicas and master before doing vbucket takover
  try to delete data files even if delete bucket failed
  actually delete buckets when node is failed over
  make sure we've replicated latest config before leaving
  log more janitor state when setting dead state
  log distance between current and future maps
  use past vbucket maps to optimize vbucket movements
  don't crash but return 400 when new bucket name is missing
  fixed filter_ready_buckets support of memcached buckets
  handle errors_500 from do_bucket_create in setup default call
  don't register/unregister ns_memcached too late/soon
  try not creating bucket if it's running on any cluster nodes
  reset node's cookie before joining cluster.MB-4476
  use proc_lib:spawn_link to spawn single vbucket mover
  skip moves for completely same new/old chains
  using debug level for debug-only ebucketmigrator messages
  upgrade config for vbucket map history with current balanced maps
  Revert "implemented set_param....MB-4872"

Conflicts:
	src/ns_bucket.erl
	src/ns_config_default.erl
	src/ns_memcached.erl
	src/ns_server_sup.erl
	src/ns_single_vbucket_mover.erl
	src/ns_vbucket_mover.erl

Change-Id: Ib421a63c1b1028bee0371612a7ecbbf2a0edbae7
Merge remote-tracking branch 'origin/master' into dp4-adaptation

* origin/master:
  questionable: tcpnodelay for ebucketmigrator sockets
  deactivate node now marks it as failed over
  ask memcached to die real quick on failover
  allow port_servers to send arbitrary data to port's stdin
  unbreak warmup completion detection
  made supervisor_cushion exit with same reason as child
  Implemented synchronous rebalance stopping
  log planned moves instead of vbucket map
  delete old copies of vbucket after vbucket movemenet
  deregister tap names after using them for building replicas
  backfill all new replicas and master before doing vbucket takover
  try to delete data files even if delete bucket failed
  actually delete buckets when node is failed over
  make sure we've replicated latest config before leaving
  log more janitor state when setting dead state
  log distance between current and future maps
  use past vbucket maps to optimize vbucket movements
  don't crash but return 400 when new bucket name is missing
  fixed filter_ready_buckets support of memcached buckets
  handle errors_500 from do_bucket_create in setup default call
  don't register/unregister ns_memcached too late/soon
  try not creating bucket if it's running on any cluster nodes
  reset node's cookie before joining cluster.MB-4476
  use proc_lib:spawn_link to spawn single vbucket mover
  skip moves for completely same new/old chains
  using debug level for debug-only ebucketmigrator messages
  upgrade config for vbucket map history with current balanced maps
  Revert "implemented set_param....MB-4872"