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>
Is len in chars or bytes? (I'm guessing bytes here)

It's a good idea to make that explicit via identifier naming (i.e. call it lenBytes).

It's also worth considering whether it SHOULD be in chars (see comment above).