fixing an issue where single quotes are breaking xml serialization

If my java code constructs xml with single quotes in text() nodes then the serialization to xml back in XQuery fails. This fix replaces single quotes with 2 single quotes and thus allows unquote to do its magic.