Work around LXML's trust issues

LXML will error if it's given a Unicode string and the HTML document states an
encoding. We work around this by decoding strings to unicode as late as
possible.