Reimplement java.lang.String with JS Strings.

https://developer.mozilla.org/en-US/docs/Web/API/TextEncoder We found that was much faster in pdf.js.