Couchbase sync gateway

Resolves jira task BROOKLYN-9
The logic is reversed, so it until the node starts rebalancing, then waits for it to stop rebalancing