Implement MasterElection

That'd work well for smaller sets of states, but I think `Transition()` would end up being quite large.