MB-9368: Revert "MB-8667 Make alloc_util allocators use malloc."

This reverts commit 716252a033f55961a75465f52d59bb2d465392f2.

This commit is currently prime suspect of larger memory usage and
slower rebalance with views of recent code. Easiest way to test it is
to try to revert.

Change-Id: I39ea661508bc034e1df749e3ad232bd25976cb77
Reviewed-on: http://review.couchbase.org/29839
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Reviewed-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>
Merge branch 'for-rackaware'

* for-rackaware:
  MB-9368: Revert "MB-8667 Make alloc_util allocators use malloc."

Change-Id: I580c0512c79cf773a758c0b37c3bf15d0a67c850
MB-9422 Fix recovery map generation.

Here's what recovery map generation code supposed to do:

 1. Figure out which nodes have more vbuckets than they would have
 if vbuckets were equally distributed.

 2. Distribute missing vbuckets among the underutilized nodes so that
 these nodes have more or less equal number of vbuckets.

Unfortunately the code was flawed. It assumed that it's never possible
to "run out" of missing vbuckets and that, basically, every node will
get at least some subset of them. Which is of course not true.

I removed the part that determined under/overutilized nodes and just
assume that since rebalance will be needed anyway, it's enough to just
not put on each node more vbuckets than it would have if the vbucket
map was balanced. I also replaced the call to lists:split to similar
function misc:safe_split. The difference is that the latter doesn't
crash if the list to split is larger than the split index.

I also added a test to verify for different input parameters recovery
map can be generated and that it assign every of the missing vbuckets
to some node.

Change-Id: I6f6b13775f4b1f9bbbdac9d098732c646e44f658
Reviewed-on: http://review.couchbase.org/29769
Tested-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
MB-100 Emit a warning when beat messages are dropped.

Change-Id: I42177b6ce0fb5131642c64678fec1b06b48841c9
Reviewed-on: http://review.couchbase.org/29770
Tested-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
MB-100 Log the same node status that triggered auto-failover.

Change-Id: Ie3cd295afb59ced00848cfe0771e4ef1f3b66053
Reviewed-on: http://review.couchbase.org/29771
Tested-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Merge branch 'for-rackaware'

* for-rackaware:
  MB-100 Log the same node status that triggered auto-failover.
  MB-100 Emit a warning when beat messages are dropped.
  MB-9422 Fix recovery map generation.

This is trivial merge.

Change-Id: I58dd41deedb4fc9c573c02c7b2c010b57f109944
MB-8972: casper test for failover confirm dialog

Change-Id: I2b0f81c0c4dff1faec929145dde3f9d8c03d6fcc
Reviewed-on: http://review.couchbase.org/29875
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
MB-8972: fixed launch of rebalance

Change-Id: I77055eb9af6d29103cb3fb6ae4aef9e5d02afa01
Reviewed-on: http://review.couchbase.org/29876
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Merge branch 'for-rackaware'

* for-rackaware:
  MB-8972: fixed launch of rebalance
  MB-8972: casper test for failover confirm dialog

trivial merge

Change-Id: I308d819e2d4972265af82bae56d5f91704312864