cocos2d/cocos2d-x — pull request #5500 by dumganhar (2014-03-01 06:11:49+00:00)
Title: Refactors Scheduler class.

* Timer is an abstract class now.
* Adds three new timers ( `TimerTargetSelector`, `TimerTargetCallback`, `TimerScriptHandler`) which are inherited from Timer.
* Adds new API `scheduleCallback` / `unscheduleCallbackForKey`, and callback's target could be any classes since we're using `void*` to identify target.
* `Scheduler::scheduleCallback` use `std::function`, therefore, it supports passing `lambda`, `member_function` and `global_function`.
* The old selector API is still kept since **it's very useful** when schedule callback is a **member function**, it doesn't need a `key` to identify the callback function.
* Adds relevant test cases.