[jvm] fix decoding of bufs for bufs that do not match encoding bit width

When we want to decode a buf8 to utf16, we have to take two elems, assemble
what Java thinks is a codepoint and append that to our StringBuilder. For
buf32->utf16 we do the opposite and for buf16->utf16 we get away with
appending the elems to the StringBuilder.
Note: Since StringBuilder does not distinguish between utf16 and utf32, we
treat them equally until we know better.