[Issue #2053] Ensuring that invalidateSessionCancelingTasks only executes on main thread, to avoid potential KVO leak