MB-5307 Race-free handling of rebalance in auto_failover.

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