Fix bugs in state log and state machine.
Clean up serialization and general message passing throughout.
Remove optional dependencies from core API.
Refactor election implementation to ensure election handles are only called once.
Refactor state context to complete opening context once a leader is elected.
Refactor cluster coordination to use a replicated log for coordination.