Convert Emoji to the wp_smile when it is available on WordPress, otherwise convert it to the HTML numeric entity.
Strips invalid characters out when the serialization fails.
Use codePoint to map between Emoji and text.
Refactoring
Remove unused import and variable
Use StringBuilder rather than StringBuffer to hold the output
Use a 2nd dummy serializer to test the string before using the "official" serializer
Another instance of StringBuffer replaced with StringBuilder
Refactor the code to use a separate routine that returns a valid serializable string.
Merge pull request #819 from wordpress-mobile/issue/809-Illegal-Character-emoji

Fix posting issue with Emoji (and with illegal characters that are outside the XML 1.0 Charset)