MB-11435: implemented new concurrency throttle

New throttle implements more or less round-robin scheduling of
workers, which is different from "least loaded destination" of
existing concurrency throttle. But new throttle is built to be faster.

Change-Id: I8577357070028a3a77f43a3913fd77562a877263
Reviewed-on: http://review.couchbase.org/39190
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Reviewed-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>
MB-11435: made old concurrency_throttle to behave as new throttle

I.e. so that we can send same calls and casts to both throttle kinds
and expect things to work.

Change-Id: Ic1fba0b5a8000dff2cd29f22cc617a024f94f327
Reviewed-on: http://review.couchbase.org/39191
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Reviewed-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>
MB-11435: switch to new concurrency throttle

There is now ns_config variable that allows us to pick old concurrency
throttle.

You can choose old concurrency throttle by /diag/eval-ing this:

ns_config:set(xdcr_use_old_throttle, true).

Change-Id: I194ce4b6e7d22cd8d573913ec2c292a966c3bbbe
Reviewed-on: http://review.couchbase.org/39192
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Reviewed-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>
Remove one of many unused functions in misc module.

Change-Id: Id03929f85aa3ad725b5be25198f0987fd92c8c44
Reviewed-on: http://review.couchbase.org/39226
Tested-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
MB-11608 Don't require halt() to complete outstanding IO.

This was the default in R14.

Change-Id: I837b2a22a6f78d8c73ed8ac8d529bb98784f1596
Reviewed-on: http://review.couchbase.org/39227
Tested-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Fallback to regular halt/1 if halt/2 is undefined.

Which is the case in R14.

Change-Id: I205fa969d93ae1e313d05c23539214c95b9c103a
Reviewed-on: http://review.couchbase.org/39228
Tested-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
return node version from prepare_rebalance call

Change-Id: Id99731e69291d13950c2f10006cc3efafd80b169
rewire inhibit and uninhibit compaction calls via janitor_agent

...to have one single frontend for remote calls

Change-Id: I8936cb8ff4713ec867151162cf8d6444ac961423
frontend for compaction daemon

... abstracts the compaction daemon api from the inner structure of
the compaction daemon which will eliminate the need of backwards compat
code for potential future changes in compaction daemon

Change-Id: I59499d3a0e531b5fe328990d8bfe4e5ee41f8682
re-factoring: abstract compaction scheduler code into separate module

Change-Id: I694a8c51996053d930b3e2c494ec9ba186029487