Delegated the PJAX check to the AppController.
Delegated the responsibility of disabling layouts to the base controller.