Fixed #2445 correct a mistake in CCScheduler.js when refactoring code for performance