Support atomic write batches.

See #22.