MOTOR-38, fix RS tests for narrowed localhost exception.

See SERVER 12621. This applies the previous fixes, but to
replica set tests specifically.