in turn until a list of hosts is found. Then try each host in turn until
the primary server is found. Non-primary hosts usually give you the name
of the primary host so we can jump straight to it.Implementation note. We recurse between this routine and MongoDriver.reconnect.
In theory, we could have unbounded recursion so the recursion depth is limited.
In practice, this should never happen.