Makes all JS tests access the replica set member state from the class itself instead of the object instance. Also removes some unused code.
also added subcommands to replSetTest to access these functions from JS tests