Fixed a potential deadlock. There was a synchronous performBlockAndWait in the contextDidSave: when creating global ids. If this was on the main thread, the notification that would be posted when saving the event store could deadlock, because it accesses the main thread.