SERVER-9066: avoid duplicate JS field names
SERVER-9174 Race condition on read_pref_rs_client.js after reconfig

Replaced js test with cpp unit test that does not rely on reconfig.