Escape newlines and tabs in content when writing XML.

By having them escaped, we prevent their replacement with simple
whitespace when reparsing. Fixes bug 7519.