Changed variable name.
Removed propertiesToFetch from Core Data fetches. According to docs, it is only used for dictionary results, and I suspect it may have been causing fetches to ignore in-memory changes.
Standardized NSURL paths.
Removed a potential race condition where events were created before they were registered with the event store for cleanup after a crash.
Work on avoiding race conditions between saves and merges. There is now a new event type: CDEStoreModificationEventTypeIncomplete. While events are being built, they have this type. Fetch requests have predicates to avoid including these events.
This was prompted by a case where there were two non-baseline events with the same revision number from the same device. This should not be possible, and various steps have been taken to avoid this arising.