TermRecord: safer decoding and encoding for browser consumption

+ We now assume all input is utf-8 and replace characters that are invalid.
+ This is closer to observed terminal behavior on my Ubuntu system.

- Still having issues with 'mc,' but rendering is much better.
examples: adding `mc` command example test case

- Still can't render this perfect