WIP: Add election framework to master; publish services.

Needs tests still.
I'll think about that over lunch. Not sure if this code will be long-enough lived for that to be a consideration.