JS tests for replica set flapping and heartbeatTimeoutSecs 

This is pending review in JIRA for 2.4 QA. Opening the PR earlier so I can refer to it.