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
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
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
Merge pull request #784 from greezybacon/issue/xkcd-oops

Remove accidental inclusion of remote web page

Reviewed-By: Peter Rotich <peter@osticket.com>