[lib] Add a function to DM operations spec checking if an operation can be applied
Summary:
If this function returns false, we will queue the operation for later. Some logic in the processing code can be simplified as the result of this change.
Depends on D12936
Test Plan: Tested this for one case - creating change_thread_settings update for a thread that isn't present in the store. Also tested that if the thread is in the store, the ops are being processed.
Reviewers: kamil, inka, ashoat
Reviewed By: inka, ashoat
Subscribers: ashoat
Differential Revision: https://phab.comm.dev/D12948