This is just a cleanup work to hide some of the private state of
ReplSetTest so it is easier to encapsulate and add new logic. Also enables
strict mode.
The topology coordinator needs to track two distinct notions of a node not being
willing to stand for election. The first is that of the step-down period.
During the step down period, the node will not stand for election due to the
step-down command being issued. In heartbeat responses, nodes in the step down
period should report that they are not electable.
The second notion is that of the post election sleep period. If a node loses an
election, it declines to stand again for a brief period of time (1 second plus a
random interval), to avert problems related to ties. During this period, its
heartbeat responses should still report the node is electable, to suppress the
election of lower priority nodes.
With the 30 second lease time, it is possible for it to take just over 30 seconds to elect
a new primary in replsetprio1.js. Bump the wait time in the test to 60 seconds.