Item12337: remove dependency on version 4.0 of HTML::TreeBuilder

Okay, here's the story again. HTML::TreeBuilder does a lot of entity mangling
by default. HTML::Entities assumes ISO-8859-1 when working on byte strings.
Therefore, things tend to break if the charset isn't ISO-8859-1.

The original fix for Item11755 was to stop entity processing completely, but
that requires a new feature in HTML::TreeBuilder 4.0.

Before that, I tried fixing the problem by throwing Encode calls into the code
various ways, but didn't manage to hit just the right combination. It turns
out that if you convert the initial input into a Unicode string and the final
output back into a byte string, things work as desired. So, do that.

Original Author:    JanKrueger <JanKrueger@0b4bb1d4-4e5a-0410-9cc4-b2b747904278>

git-svn-id: http://svn.foswiki.org/branches/Release01x01/CompareRevisionsAddOn@16357 0b4bb1d4-4e5a-0410-9cc4-b2b747904278