SERVER-10927 Fix test to wait for replication correctly

Fixes a race condition causing some builders to fail