Unicode support for screen and ANSI

This is a continuation of PR #96, with a few more tweaks of how screen handles encoding and decoding. I think it's about ready.