Moves macro-defined methods of CStr to templates.
Differential Revision: https://code.wildfiregames.com/D4251