WIP: Add a utility for doing master election via etcd.

Sending this for comment, will work on unit tests once people are happy with the code.
I don't know if my comment got lost, this feels like a) it's not dependent on EtcdHelper (EtcdGetSet instead) and b) could be in its own file