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.

Fixes #916