HPCC-9175 Optimize unnecessary copies of unicode strings

Signed-off-by: Gavin Halliday <gavin.halliday@lexisnexis.com>