Feature/5895 store all incoming documents in sync db

The context manager is now included inside the db wrapper. That reminds me i have to update docstrings for `self._sync_db` accordingly.