Fix soupparser support.

Soupparser did not properly handle doctypes or comments/processing instructions at root level, see https://bugs.launchpad.net/lxml/+bug/1341964. Fix that.