Document#to_s should produce just the content of the document.

Fixes #2655