Mark tickets overdue which have no SLA

If a ticket has a due date and does not have an SLA set, the ticket would
never transition to overdue. This patch addresses an SQL flaw preventing the
ticket from being transitioned.

Fixes #757
Support incorrectly labeled us-ascii charsets

Some email clients (names omitted to protect the innocent) advertise the
encoding as us-ascii when iso-8859-1 was really implied. This patch allows
the two charsets to be interchangable.
Merge pull request #770 from greezybacon/issue/us-ascii-not-really

Support incorrectly labeled us-ascii charsets

Reviewed-By: Peter Rotich <peter@osticket.com>
Reduce cost of deleting orphaned files

Previous explain included a nested sub-select, which exponentially increased
the count of the rows to be examined. This patch eliminates one layer of
nesting on the sub-select and dramatically increases the performance finding
orphaned files.

Fixes #773

References:
http://www.osticket.com/forums/forum/osticket-1-7-latest-release/troubleshooting-and-problems-aa/9446-version-1-7-much-slower-than-1-6
Support updating the source of the ticket

Fixes #772
Make Crypto::random() more reliable on Windows

This patch makes openssl the preferred source of random data on Windows and
will only use mcrypt_create_iv on PHP 5.3.7 and newer.

Fixes #771
Support non-standard port numbers for MySQLi

Validate port during installation

Add help information about the non-standard port number to the popup tips in
the install screen.

Support MySQL 'localhost' connections using a non-standard port number.
Ordinarily, MySQL will ignore the port setting on *nix systems if the host
is specified as 'localhost'

Implements/Fixes #769
Use http::redirect(...) which exits on redirect.
Merge pull request #779 from protich/develop

Die on redirect

Reviewed-By: Jared Hancock <jared@osticket.com>
Handle parsing email if Reply-To header is missing
Merge pull request #777 from greezybacon/issue/772

Support updating the source of the ticket

Reviewed-By: Peter Rotich <peter@osticket.com>
Merge pull request #778 from greezybacon/issue/773

Reduce cost of deleting orphaned files

Reviewed-By: Peter Rotich <peter@osticket.com>
Merge pull request #780 from greezybacon/issue/email-reply-to

Handle parsing email if Reply-To header is missing

Reviewed-By: Peter Rotich <peter@osticket.com>
Merge pull request #776 from greezybacon/issue/771

Make Crypto::random() more reliable on Windows

Reviewed-By: Peter Rotich <peter@osticket.com>
Merge pull request #767 from greezybacon/issue/757

Mark tickets overdue which have no SLA

Reviewed-By:  Peter Rotich <peter@osticket.com>
Include category name and description in KB search
Merge pull request #775 from greezybacon/feature/mysqli-nonstandard-port

Support non-standard port numbers for MySQLi

Reviewed-By: Peter Rotich <peter@osticket.com>
Merge pull request #781 from protich/issue/kb_category_search

Include category when searching the knowledge base 

Reviewed-By: Jared Hancock <jared@osticket.com>
Remove accidental inclusion of remote web page

The XKCD index page was accidentally added when testing a new feature for
osTicket-1.8
Support ticket thread items in email templates

* %{ticket.thread.original} represents the original message submitted when
    creating the ticket
* %{ticket.thread.lastmessage} represents the most recent message submitted
    by the end user