creates mainContext and backgroundContext for use in DatabaseManager