HPCC-9175 Optimize unnecessary copies of unicode strings

Signed-off-by: Gavin Halliday <gavin.halliday@lexisnexis.com>
Merge pull request #4263 from ghalliday/issue9175

HPCC-9175 Optimize unnecessary copies of unicode strings

Reviewed-By: Richard Chapman <rchapman@hpccsystems.com>