Add atomicity tests to couch backend.

(from redmine: created on 2013-12-19, closed on 2013-12-19)