Fix for subject lines with invalid UTF-8 as the last character

This seems to be the bug mentioned here:

  http://po-ru.com/diary/fixing-invalid-utf-8-in-ruby-revisited/

That explains that some versions of Iconv don't ignore
invalid characters when converting to UTF-8 even with
//IGNORE if that invalid character happens to be at the end
of the string.  Since this is an urgent fix, I haven't added
a test case to reproduce that yet, but I will do that next.