[LANG-720] StringEscapeUtils.escapeXml(input) outputs wrong results when an input contains characters in Supplementary Planes. ALSO rewrite method to avoid modification of counter variable in for loop