Core data concurrency fixes

These are minor fixes for assertions that occur when debugging while using the `-com.apple.CoreData.ConcurrencyDebug 1` argument. The assertions occurred due to NSManagedObjectContexts or NSManagedObjects being accessed from the wrong dispatch queue.