refactoring sync gateway test execution

Change-Id: Iac4e12a78086302ce5b1edec1794f4a2d19f1712
Reviewed-on: http://review.couchbase.org/36796
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Pavel Paulau <pavel.paulau@gmail.com>