MB-8263 Start ns_bucket_{worker,sup} in a dedicated supervisor.

With previous approach if both ns_bucket_worker and ns_bucket_sup
crash at about the same time, it was possible to lose the work that
would start single_bucket_sup's. To prevent this both ns_bucket_worker
and ns_bucket_sup are now started in a dedicated supervisor with
one_for_all strategy. So that if any of them crashes, the other gets
restarted and correctly reinitialized.

Change-Id: I288676eed3f016c1708d8f79b295a1f109c83835
Reviewed-on: http://review.couchbase.org/26331
Tested-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
MB-8013 Don't update stats when we know nothing new.

Change-Id: I8068a69d0f8bfb37fd41c02eb9fc276cc437bec6
Reviewed-on: http://review.couchbase.org/26332
Tested-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
MB-8013 Show details about ingoing transfers during rebalance.

Rebalance task updated accordingly, e.g.:

 {
        "detailedProgress": {
            "bucket": "default",
            "bucketNumber": 1,
            "bucketsCount": 1,
            "perNode": {
                "n_0@10.17.45.204": {
                    "ingoing": {
                        "activeVBucketsLeft": 0,
                        "docsTotal": 0,
                        "docsTransferred": 0,
                        "replicaVBucketsLeft": 0
                    },
                    "outgoing": {
                        "activeVBucketsLeft": 0,
                        "docsTotal": 1024,
                        "docsTransferred": 816,
                        "replicaVBucketsLeft": 0
                    }
                },
                "n_1@127.0.0.1": {
                    "ingoing": {
                        "activeVBucketsLeft": 0,
                        "docsTotal": 1024,
                        "docsTransferred": 816,
                        "replicaVBucketsLeft": 208
                    },
                    "outgoing": {
                        "activeVBucketsLeft": 0,
                        "docsTotal": 0,
                        "docsTransferred": 0,
                        "replicaVBucketsLeft": 0
                    }
                }
            }
        },
        "perNode": {
            "n_0@10.17.45.204": {
                "progress": 72.91666666666667
            },
            "n_1@127.0.0.1": {
                "progress": 100.0
            }
        },
        "progress": 86.45833333333334,
        "recommendedRefreshPeriod": 0.25,
        "status": "running",
        "type": "rebalance"
    }

Change-Id: I045341eaafd9e6c884dd7e149871763ce0e26724
Reviewed-on: http://review.couchbase.org/26333
Tested-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
MB-8199 Throttle REST and CAPI requests.

There're three internal settings that control this:

 - limit on the number of REST connections (everything that goes
   through 8091 port)
 - limit on the number of CAPI connections (everything that goes
   through 8092 port)
 - memory threshold that when exceeded causes us to drop any incoming
   connection

Change-Id: Ib79c8068056193beecda536436572ca66b74f31f
Reviewed-on: http://review.couchbase.org/26334
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
MB-100 Grab babysitter processes as part of diag.

Change-Id: I0cf14713b3b39ed0cca79d11ddeaf798485b7a18
Reviewed-on: http://review.couchbase.org/26336
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>