Fix dialog boxes on backward pjax navigation

pjax:complete is only called after an AJAX page load. If a user navigates
forward or backward and the page loads from local cache, then pjax:complete
is not fired. pjax:end, however, is always fired.
Merge pull request #1034 from greezybacon/issue/916

Fix dialog boxes on backward pjax navigation

Reviewed-By: Peter Rotich <peter@osticket.com>