Add test for AtomicUpdate

This PR also implements FakeEtcdClient.CompareAndSwap.

I'll squash this PR after review.
Is it ok to just panic on failure during test? if so, we can use
ok := in.(*TestResource)