Fix type error raised when accessing document.contents

When using content in
cnxepub/tests/data/fb74dc89-47d4-4e46-aac1-b8682f487bd5@1.json, an error
"TypeError: Type 'lxml.etree._ElementUnicodeResult' cannot be
serialized." is raised when document.contents is accessed.