MB-8013 Detailed rebalance progress backend.

We have new service (ns_rebalance_observer) which gets started
whenever rebalance is initiated. The service subscribes to
master_activity_events to monitor the proceeding of rebalance. When
rebalance for certain bucket starts, it makes initial estimate of
number of documents to be transferred. This estimate may be far
off. The estimates are refined when we create tap connections for
replication building. Additionally we have a process that periodically
loops through all current moves and updates the number of documents
that are left to transfer.

Change-Id: I6a3cfef9e5b1da4bedc5643c1303315a1cc71017
Reviewed-on: http://review.couchbase.org/25908
Reviewed-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>
Tested-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>
MB-8013 REST API for detailed rebalance progress.

Rebalance task now just have additional field detailedProgress.

  curl -X GET http://127.0.0.1:9000/pools/default/tasks

  [
      {
          "detailedProgress": {
              "bucket": "default",
              "bucketNumber": 1,
              "bucketsCount": 1,
              "perNode": {
                  "n_0@10.17.43.183": {
                      "activeVBucketsLeft": 21,
                      "docsTotal": 0,
                      "docsTransferred": 0,
                      "replicaVBucketsLeft": 213
                  },
                  "n_3@127.0.0.1": {
                      "activeVBucketsLeft": 21,
                      "docsTotal": 0,
                      "docsTransferred": 0,
                      "replicaVBucketsLeft": 318
                  }
              }
          },
          "perNode": {
              "n_0@10.17.43.183": {
                  "progress": 20.026007802340708
              },
              "n_1@127.0.0.1": {
                  "progress": 0.0
              },
              "n_2@127.0.0.1": {
                  "progress": 0.0
              },
              "n_3@127.0.0.1": {
                  "progress": 25.375626043405674
              }
          },
          "progress": 11.350408461436595,
          "recommendedRefreshPeriod": 0.25,
          "status": "running",
          "type": "rebalance"
      }
  ]

  Here's a description of detailedProgress members:

    'bucket' — the bucket that's currently being rebalanced

    'bucketsCount' — overall number of buckets that are to be
                     rebalanced (this also includes the buckets for
                     which rebalance has already completed)

    'bucketNumber' — number of the bucket that's currently being
                     rebalanced in the sequence of all buckets to
                     rebalance (basically, how many buckets has been
                     rebalanced increased by one)

    'perNode' — per node details

  Here's a description of per node details members:

    'docsTotal' — estimated number of documents to be transferred from
                  the node

    'docsTransferred' – number of documents transferred so far

    'activeVBucketsLeft' — number of active vbuckets yet to be moved
                           in or out of this node

    'replicaVBucketsLeft' — number of replica vbuckets yet to be moved
                            in or out of this node

Change-Id: Iba0d2d913adad5c2dfbf854a72d581fb23d27ab5
Reviewed-on: http://review.couchbase.org/25909
Reviewed-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>
Tested-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>
MB-8013 Detailed rebalance progress UI.

Change-Id: I224a16a47d84a0661626509158aa7f59da90c3d5
Reviewed-on: http://review.couchbase.org/25910
Reviewed-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>
Tested-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>
MB-8013 Mention detailed rebalance progress feature in CHANGES.

Change-Id: I23a81f634773e55935c59612fb3df4d9ed3cdce5
Reviewed-on: http://review.couchbase.org/25911
Reviewed-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>
Tested-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>