CBQE-1512: refactor setup in failovertests.py

Change-Id: Ic94369d8cd17ad193ae7fe546be7fe38ec2a2ef5
Reviewed-on: http://review.couchbase.org/28300
Reviewed-by: Andrei Baranouski <andrei.baranouski@gmail.com>
Tested-by: Andrei Baranouski <andrei.baranouski@gmail.com>