MB-9643 hibernate ebucketmigrator_srv after timeout

- hibernate also upstream_sender
- do not hibernate during the backfill

Change-Id: I92dd4b309851ef379f55fb05d93efd0cfe1310f2
Merge "MB-9643 hibernate ebucketmigrator_srv after timeout" into for-rackaware
MB-9477 change max value of purge interval back to 60 days

Change-Id: Idd9d6826b47115a117f27fa30864b50733dec35c
[cbcollect_info] couch_dbdump _replicator docs

Change-Id: If65de892c0fc1702506176672bcc3c550efe48ed
MB-9612: handling remote_cluster_info error more gracefully

Today during vb replicator initialization, if remote_cluster_info
fails to grab remote bucket info for any reason, the vb
replicator will crash on a badmatch error and the throttle
will reschedule the next waiting one. This immediate-retry-
after-failure behavior may cause more repeated errors from
remote and vb replicators at source side may crash repeatedly
for nothing.

This commit will make vb replicator consume the error from
remote_cluster_info. If any error returns, the vb replicator
will pause for sometime (default is 30 seconds), and re-query
remote_cluster_info. If the TMP error at remote resolves in
30 seconds, the vb replicator will continue initialization
without crash. If the error persists after 30 seconds, XDCR
will not be able to start as expected.

Change-Id: I39921754887686c0b969b53eb0e4a5764b385145
Merge "MB-9612: handling remote_cluster_info error more gracefully" into for-rackaware
MB-9660: added streamingUri to terse bucket info

Because we're also sending terse bucket info as replies for streaming
bucket details. And java client expects streamingUri there and crashes
otherwise.

Change-Id: Id2c29e342a970b86af05fb99cadc084c4dff9a20
Reviewed-on: http://review.couchbase.org/30769
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Reviewed-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>
MB-9634 fix the description of avg_bg_wait_time stat

Change-Id: I6dc8cb120168c9a3a283a734e3c4a095927d9898
Reviewed-on: http://review.couchbase.org/30773
Tested-by: Artem Stemkovski <artem@couchbase.com>
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
MB-100 Don't ignore content type in json_request_hilevel.

It's actually used by menelaus_web:handle_join_tail/5.

Change-Id: I4bccfd2cd3763ecba74e3f7a1971fc7320808079
Reviewed-on: http://review.couchbase.org/30790
Tested-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
MB-1143 Rack-aware vbucket map generation updates.

  1. Multi-replica case is handled much better now: fully rack-aware
  vbucket map is generated almost always when it's possible.
  2. Best effort. Few things are tried in order:

     a. change number of slaves
     b. sacrifice rack awareness for replicas (master is still
     guaranteed to be on a different rack)
     c. sacrifice rack awareness for master too
     d. sacrifice replica vbuckets balance

Change-Id: I6daa85a26d54ab65e4bb2f0c3a0e0dc35a0d34cb
Reviewed-on: http://review.couchbase.org/30789
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
bp:Create install/bin earlier

Create the install/bin directory before it is used
the first time.

Prior to this change it made the buildbot fail [1].

[1] http://factory.couchbase.com/view/commit_validation/view/couchdb/job/couchdb-gerrit-views-pre-merge-master/71/console

Change-Id: Idfe33f37fab84f68954a4e48788b5f4595330848
Orig-Change-Id: If9b7ede8ea86d2d9307899b8a203a91d2c04552d
Reviewed-on: http://review.couchbase.org/30843
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Merge remote-tracking branch 'origin/for-rackaware'

* origin/for-rackaware:
  bp:Create install/bin earlier
  MB-1143 Rack-aware vbucket map generation updates.
  MB-100 Don't ignore content type in json_request_hilevel.
  MB-9634 fix the description of avg_bg_wait_time stat
  MB-9660: added streamingUri to terse bucket info
  MB-9612: handling remote_cluster_info error more gracefully
  [cbcollect_info] couch_dbdump _replicator docs
  MB-9477 change max value of purge interval back to 60 days
  MB-9643 hibernate ebucketmigrator_srv after timeout

Conflicts:
	src/ebucketmigrator_srv.erl

Only simple conflict in ebucketmigrator caused by removal of old-style
vbucket filter change in master.

Change-Id: I6d77f88a47c9a2ebd5d333b13470a56aed92d82d