email: Add MAIL_EOL setting to ost-config.php file

This setting allows administrators to add (uncomment) a MAIL_EOL setting in
the ost-config.php config file to define the line ending used for mail
headers and encoded bodies in outbound mail (SMTP, for instance).

By default, CRLF is used by the SMTP email generator as per the RFC 822
standard. However, many administrators can benefit by setting LF (\n) as the
line ending.
pjax: Navigate away on attachment and download links
Merge pull request #1248 from greezybacon/issue/mail-eol

email: Add MAIL_EOL setting to ost-config.php file

Reviewed-By: Peter Rotich <peter@osticket.com>
Merge pull request #1249 from greezybacon/issue/pjax-links

pjax: Navigate away on attachment and download links

Reviewed-By: Peter Rotich <peter@osticket.com>
email: Import embedded images before truncating the body
email: Improve user identification from headers

Previously, the code would scan the email headers until it found a positive
match from any of the email headers scanned. Additionally, it would attempt
to find the user from the tagged email references header. However, this
algorithm assumed that the references header was constant and predictable in
its ordering. Recent tests with Gmail prove otherwise in some tests.

This patch changes the system so that only the tagged reference header is
included in the References header, and it will scan all items in a header
(namely the References header) until both the thread and a user are
identified. If a user can be identified, the thread and user are returned.
Otherwise, the first thread hit is returned.
Merge pull request #1260 from greezybacon/issue/1259

This is the correct logic - we'll address issue #1259 separately

Reviewed-By: Peter Rotich <peter@osticket.com>
Merge pull request #1263 from greezybacon/issue/email-references-user

email: Improve user identification from headers

Reviewed-By: Peter Rotich <peter@osticket.com>
Merge remote branch 'upstream/develop' into develop-next