Use a recursive mutex in HttpRequest.

In some error cases, libevent will call our callback synchronously, so we
need to be prepared for that (and not deadlock!).
Add a libevent::Base::Delay method, for one-off delays.
Do not CHECK-fail when we X-Etcd-Index is missing.
Make SyncEtcdClient just wrap an async version
Merge pull request #341 from AlCutter/etcd_consistent_store_creates_sync_wrapper

Etcd consistent store creates sync wrapper
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.
Add more things to util::Task.