Retry scanning for primary instead of failing

Previously, when the 'get_master' method was called and there was
no primary ready, it would fail immediately.

This commit changes it to continue to scan for up to 1 minute before
throwing an error.
Test for bulk mixed-version failover