MB-5307 Don't do unneeded list copies.

Change-Id: I2315e8ed62cabc2d86fb4e8a71843817c4b7a3b9
Reviewed-on: http://review.couchbase.org/25298
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
MB-5307 Don't increment counter when autofailover is unsafe.

And to prevent spamming someone's mailbox we keep a flag showing if
we've already reported this condition.

Change-Id: I312283d1f8a2a979570b152f1faaa69039673cc3
Reviewed-on: http://review.couchbase.org/25299
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
MB-5307 Don't report that auto failover max reached every tick.

Change-Id: I78918b0b9caf3b8f9a373f6ece194db89b40c0bf
Reviewed-on: http://review.couchbase.org/25300
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
MB-5307 Unify failover and try_autofailover type specs.

They used to return different replies in case rebalancing was going
on. Now both of them just fall through to the default rebalancing
handler that returns rebalance_running. Additionally, I added the code
to actually handle these return values.

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