On native we have e.g. crypto thread or database thread to guarantee that operations will be happen sequentially. This diff brings the same for worker (db, olm) operations. I considered having different "task queues" per message db (e.g. db or olm) but I don't think it's worth as it complicates the code a lot (based on the native code). If this turns out to be a performance problem we can consider changes.
Depends on D11275