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 envision API server using this, but also replication controller (for sharding controllers ownership, for example)

I can transform it into an interface, but this seems like a basic function.

Using watch is a reasonable idea, in practice I think we need both a watch and a polling get, I will add that in.

Yes, it tells you who the current master is, no matter whether it is you or someone else, I think that's correct, if you want to separate the responder out, you can pass the channel that receives master notifications to whatever go routine you want.

This handles the case where a master goes away, because the ttl will expire, at which point the lock file will disappear from etcd, the Get call will return NotFound, and the remaining people will race to create the file again.