add text-encoding

for ipython/ipython#6110

provides TextEncoder polyfill for utf8 data in ArrayBuffer

utf8.js only does string->string conversion, which frankly misses the point.