Move $_FILES reformatting & validation to class.file.php
Change how validation is done to allow for downstream validation & fixups.
Add ticket thread class.
Fully implement thread entry class and types (Note, Message & Response)
Add method to sanitize rich/html text. Addd html encode/decode methods. Remove html encode on display (encoded text saved in db)
Refactor ticket related methods/utils to use thread model.
Balance html tags & neutralize unsafe tags on emailed html'ed emails.
Decode html entities - outgoing emails are plain text for now
Don't show reply/response section on new ticket form if the staff can NOT post replies... also checked in Ticket::open().
Refactor the class to use data hashtable instead of individual vars in getters.
Fix minor spacing/formatting issues.
Combine emailed/API attachments settings.
Make sure ticket api controller enforces attachments settings (don't trust data parsers).
Merge remote-tracking branch 'upstream/develop' into feature/ticket_thread_revisited

Conflicts:
	include/class.ticket.php
Merge pull request #487 from protich/feature/ticket_thread_revisited

Ticket thread revisited