CBQE-1010: fix xdcr when master is being rebalanced out

Cases:
async_rebalance_out_master, bidirectional
swap_rebalance_out_master, bidirectional

Change-Id: Ifdd2fe9fcc94cf2f32b52b03c5cfa89a7b7cd3a6
Reviewed-on: http://review.couchbase.org/24476
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Andrei Baranouski <andrei.baranouski@gmail.com>