Show stack trace for fatal errors if xdebug is loaded.

Backport of https://github.com/cakephp/cakephp/pull/5045 for 2.x
@ionas It doesn't matter that much :)