Add an etcd watcher class.

Also a few cleanups I forgot in previous commits, like not using a temporary object when using ```UpdateLeader```, and using an ```unique_ptr``` in ```RequestDone```.
On Fri Nov 14 2014 at 3:42:49 PM Al Cutter <notifications@github.com> wrote:

> In cpp/util/etcd.cc:
>
> > +    }
> > +
> > +    last_index_seen_ = modifiedIndex.Value();
> > +
> > +    if (!cancelled_) {
> > +      cb_(modifiedIndex.Value(), value.Value());
> > +    }
> > +  } while (false);
> > +
> > +  if (!cancelled_) {
> > +    StartRequest();
> > +  }
> > +}
> > +
> > +
> > +// Must be called with lock_ held.
>
> Shame there's no mutex::held()
>

You could wrap mutex if you want that...


> —
> Reply to this email directly or view it on GitHub
> <https://github.com/google/certificate-transparency/pull/232/files#r20365807>
> .
>