lib: Add notmuch_database_{begin,end}_atomic.