SERVER-15080 Clarify state-changing behavior of TopologyCoordinator and its implementation.

This patch simplifies the state stored in the TopologyCoordinatorImpl, introduces fuller documentary
comments to the interface, checks preconditions, deprecates several methods currently used only in
testing, and generally tries to make the behavior easier to follow.

Methods are introduced for adjusting the maintenance mode count; to allow the applier to move
the node between recovering, rollback, initial sync and secondary states; to handle winning and
losing elections, etc.
SERVER-15080 Move HeartbeatResponseAction and TopologyCoordinator::Role for readability.

HeartbeatResponseAction moves to its own file and becomes a top-level type,
because it is sometimes useful to have its definition without that of
TopologyCoordinator, and because it clutters the TopologyCoordinator class
definition.  TopologyCoordinator::Role gets defined at the end of the
topology_coordinator.h header, so it also does not clutter the
TopologyCoordinator class definition.
SERVER-15080 Fix assert code conflict.
Merge remote-tracking branch 'upstream/master'