Properly encode htmlchars in thread bodies

And avoid double encoding email bodies if html thread is not enabled
Merge pull request #188 from greezybacon/issue/double-encode-email-htmlchars

Properly encode htmlchars in thread bodies

Reviewed-By: Peter Rotich <peter@osticket.com>