Add WaitForReady function
Initial test
Test timeout
Reduce timeout in test
Test WaitUntilReady passes errors through
Switch to using WaitUntilReady for backups
Handle connection refused errors
Minor test fixes
Merge branch 'master' into backup-replicaset
Test fix
Switch to majority check instead of all healthy check
Better error checking
Merge pull request #1269 from voidspace/backup-replicaset

Backup waits for replicaset

A new WaitUntilReady function that waits for replicaset.IsReady to return true. Backups use this function to wait (up to 60 seconds) for the replicaset to be ready, rather than failing.

It also changes the IsReady implementation to check that a majority of members are healthy instead of all members. This permits a backup when one member is down (which we don't want to prevent!).

(Review request: http://reviews.vapour.ws/r/583/)