[lib] Refactor messages queue in DMOpsQueueHandler
Summary:
https://linear.app/comm/issue/ENG-9808/consider-modifying-the-queues-logic-to-be-more-resilient
Depends on D13859
Test Plan: Add entities to the messages queue by calling processDMOps from useProcessDMOperation and verify entities are processed.
Reviewers: tomek, kamil
Reviewed By: tomek
Subscribers: ashoat
Differential Revision: https://phab.comm.dev/D13860