Create ThreadBody class to keep track of text type

This will be helpful to keep track of whether a text is html or text and
provide a way to convert it exactly once.
Add ability to trip tags on-request
Cleanup and make HTML safe by default
Strip empty lines in TEXT content
Decide the thread body type at email parsing time.

This would in theory allow us to decide at the email level the content type
to accept.
Fix fixup routines for JSON/XML parsers to use the new ticket thread body
model.
Remove quoted response removal - it's now handled at the email parsing
level.
Handle cases where thready body is sent in as a string

We're going to assume HTML of html thread is enabled - otherwise text is
assumed.
Assume system generated internal notes are HTML when not specified
Add support for * input type to Validator

This is required when validating a message which could be a string or an
object.
Fix JSON parsing
Store empty tag when thread body is empty
Merge pull request #508 from protich/feature/thread-body-revisited

Thread body revisited

Reviewed-By: Jared Hancock <jared@osticket.com>