issue #2790: (ONLY FOR REVIEW NOW)Template Containers for Reference counted classes, Value for Pure Data

Please don't merge, this PR is only for review. Thanks.
* Next: Fixes the compilation errors for JSB and LUA projects.