Core Data stack in swift. Attempts to avoid state and use only pure functions (no singletons here)