Fix layout issues with AdminLTE overload (task #4050)
Fix layout issues with AdminLTE overload (task #4050)

`beforeFilter()` event is triggered during the Controller.initialize(),
while `beforeRender()` event is triggered after the Controller action
login.

This meas that setting the layout in `beforeRender()` will ALWAYS use
the layout, overwriting whatever was set in the controller action. This
is not always desirable, as controller actions might need other layouts
(for example - AJAX, blank, etc).

Moving the layout setting to the `beforeFilter()` event, instead,
provides a default for the fallback, in those cases where controller
action did not set any custom layouts.

QoboLtd/project-template-cakephp,QoboLtd/project-template-cakephp,QoboLtd/project-template-cakephp,QoboLtd/project-template-cakephp,QoboLtd/project-template-cakephp