Update utf8 implementation

This pull request replaces the utf8 implementation with the one from pako. This fixes #142.
very minor point, but any reason you have the intermediate array here, instead of just nesting the function calls, as above?