Improve concurrency and performance of conversation log history.
Use SequenceManager to assign the next messageID in ofMucConversationLog, instead of using select count(*) as part of the insert query, to solve 2 issues:
In a clustered environment, with concurrent transactions taking place and default tx isolation level repeatable read, it was the cause of continuous deadlocks.
If a process to remove old conversation logs is set up, having count(*) as messageID would lead to duplicates.
Instead of inserting conversation logs message by message, they're stored in batches as part of a single db transaction, to improve performance.