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.