HPCC-11402 Extracting a unicode string from a varunicode could truncate it

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