HPCC-12349 Fix toJSON output of extra characters for unicode strings

JSON outputUnicode and outputUtf8 were handling byte count vs character count inconsistently when calling appendJSONStringValue.

Signed-off-by: Anthony Fishbeck <anthony.fishbeck@lexisnexis.com>
if chlen is > remaining it implies a partial char at the end of the string, I assume. Does it also mean that uff8CharLen may have read off the end of the passed in buffer and potentially cored? Or can you always tell the length from the first byte?