Fix encoding issues related to #41. Close #28.

This commit definitely fixed the HTML encoding issues and happens to fix issue #28 as well. I removed searchAndReplaceEmoticonsIn() in favor of searchAndReplaceEmoticonsInEncodedString(), which takes only a string and returns an HTML string, which is already XSS safe because it has been already escaped.