Added an async task queue for leeching and deleeching. Cleans up the nesting.
Also changed CDEAsynchronousTaskQueue so that start always gets shunted to the main thread.
Added a serial operation queue in the CDEPersistentStoreEnsemble class. It is used to queue up leeching/merging/deleeching. The actual operations fun on the main thread, due to the shunting of the ‘start’ method to the main thread.
When deleeching, now cancel all existing operations.
Use the new operation queue for processing pending changes. Ensures that any existing operations go through first.
Implemented proper cancellation of merging, using the new operation queue.
Cleaned up the cancel method for merges.
Fixed a deadlock caused by the processPendingChanges… method.