Fix a crash bug of cocos2d's swap buffer.
Fix a crash bug of cocos2d's swap buffer.

Fixed it via adding to stop/start animation properly when application did enter background, and will enter foreground.

diwu/AnalyticX,diwu/AnalyticX,diwu/AnalyticX,diwu/AnalyticX