CBQE-0 :: fix Master Failover Logic


The logic to failover a master node was broken. 

Sample RUNS

Failover Master

https://friendpaste.com/2ZRu6mHN4TYwVKTcTimFNt

Failover Non-Master Nodes

https://friendpaste.com/2ZRu6mHN4TYwVKTcTimEpx

Change-Id: Ib26f79649fdfd89e13431250f330c10050c930e8
Reviewed-on: http://review.couchbase.org/40227
Reviewed-by: Thuan Nguyen <soccon@gmail.com>
Tested-by: buildbot <build@couchbase.com>