Only write to etcd if values have changed

This prevents certain loops from writing data to etcd every few
seconds (when data hasn't changed).