DR-129 XDoc ToString/ToCompactString/ToPrettyString/WriteTo/ToXHtml can emit illegal XML chars

Reviewed by YuriG