Consistently handle emails

Whether HTML ticket thread is enabled or not, consistently handle the
processing of the email bodies
Fix deployment script

Fixes #20
Fix NOTICE errors from cli cron

Fix PHP NOTICE level errors for cron jobs executed from the command line

Fixes #4
Make email template content valid HTML

Wrap the upgraded email template data in an HTML <div> element so that the
final content is valid HTML. This is useful for the mailer to identify the
message content as HTML
Provide delay on inline-image hover

This means that drive-by mouse hovers, where the user likely did not intend
for the hover to actually popup the banner with the filename and download
button, do not trigger the popup. This patch changes the popup effect so
that it requires a 500ms hover before the popup is shown.
Add M$ default styles for Outlook-generated email
Show lines closer together in the redactor editor
Show normal font-size in blockquote responses
Use Redactor in linebreaks mode

Linebreaks mode will result in <Enter> key adding a <br/> element to the
HTML markup rather than starting a new paragraph <p> element.

This patch also changes the behavior of the <Tab> key to change focus away
from the Redactor editor rather than indenting the current block.
Better space usage on ticket-view page
Only show warnings if ticket is already closed
Remove <style> and <head> elements

Upgrade to htmLawed 1.1.16

Remove @id attributes as they could confuse existing id attributes used for
styling and javascript.

Remove @class attributes except for standard ones used by Microsoft® office
which have entries in our thread stylesheet.
Avoid double-encoding canned responses on upgrade
Provide '--' message for empty messages

Provide fallback html2text mechanism if PHP xml extension is not available
Merge pull request #28 from greezybacon/issue/after-further-review

Several commits made after another feature review

Reviewed-By: Peter Rotich <peter@osticket.com>
Merge pull request #31 from greezybacon/issue/upgrader-amp

Upgrader double encodes < to &amp;lt;

Reviewed-By: Peter Rotich <peter@osticket.com>
Merge pull request #22 from greezybacon/issue/4

Fix NOTICE errors from cli cron

Reviewed-By: Peter Rotich <peter@osticket.com>
Merge pull request #21 from greezybacon/issue/deploy-broke

Fix deployment script

Reviewed-By: Peter Rotich <peter@osticket.com>
Better conversion of html to text if no xml ext

If the xml extension for php is not loaded, this patch will do a better job
of honoring line break hints in the html.
Merge pull request #29 from greezybacon/issue/consistent-text-handling

Consistently handle emails

Reviewed-By: Peter Rotich <peter@osticket.com>