Reverts changes in CCApplication.cpp/.mm, pollEvent must after main loop, otherwise, potential crash will happen.
Merge pull request #28 from cocos2d/develop

update with upstream
Merge branch 'develop' of https://github.com/dumganhar/cocos2d-x into develop
Merge pull request #5815 from dumganhar/develop

Reverts changes in CCApplication.cpp/.mm, pollEvent must after main loop, otherwise, potential crash will happen.