Revert "Revert "SERVER-14728 Shard depends on string comparison of replica set connection string""

This reverts commit d261864e9156af7ecc3d0491111dffa0161e9d0d.
SERVER-14728 Shard depends on string comparison of replica set connection string

Fix iterator incompatible issue.