Fix an election timing bug exposed by unit test.
WIP on making Raft use directory-style metadata instead of timeouts for elections.