Fix loading of non-UTF8 encoded files

Including adding a command line argument for specifying the encoding.

The CharsetDecoder already does all the hard work, we just needed to pay attention to the CoderResult. New tests are variations of the test case originally producing the hang.

Also removed some dead code while in the area.