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>
Since we generally pass around uft8 lengths as chars rather than bytes, might it make more sense to make appendJSONStringValue expect the length in chars?