gpodder.storage: Use lock for writing to the database