Replace fixed 3-second sleep with a proper readiness loop (up to 60s)
that polls MongoDB via ping before attempting replica set initiation.
The previous sleep was insufficient on slower systems, causing
'MongoNetworkError: connect ECONNREFUSED 127.0.0.1:27017'.
Fixes#13136