Makes all JS tests access the replica set member state from the class itself instead of the object instance. Also removes some unused code.
(cherry picked from commit b0a6137a79)
b0a6137a79