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
Merge pull request #767 from greezybacon/issue/757

Mark tickets overdue which have no SLA

Reviewed-By:  Peter Rotich <peter@osticket.com>