Merge PR #6012: Add cocos2d::RefPtr<T>

Merge PR #6012