Removed RefCounter by replacing with shared_ptr.
Removed some redundant code from tstring.cpp.
Reduced unnecessary copies of shared_ptr when copying String.