Content encoding fix

There was a straightforward bug in the way the reader/base class handles the raw HTML content. The existing unicode conversion code was being called after the initial call to Pismo::Document.clean_html, which was causing the gsub! calls in clean_html to choke on some bad html. I just moved the call order around a little and wrote some additional logic to handle another corner case that cropped up.

I also pulled in the pull requests made by @bborn and @ashleyw, but my fixes don't depend on those so you should be able to isolate my commits if you want to just pull those in.