Adding shared_ptr support and adding samples.

Don't merge it before we decide to use smart pointer in cocos2d-x 3.0.
This PR is just for testing and review now.