Optimize the encoding and decoding of UTF8 and US_ASCII.

The new implementations are faster then the one that is shipped with the JDK and also
produce less objects, which in fact means less objects to GC.