Add "using" statements to util/masterelection.cc.
Convert etcd watchers to use util::Task.
Factor out a standalone EventPump for use in tests etc.
Have masterelection_test wait on the leadership.
Merge pull request #343 from AlCutter/event_pump

Factor out a standalone EventPump for use in tests etc.