Make html2text compatible with python 3 and fix all tests

See individual commit messages for more info.