Refactor fatal error handling

This pull request refactors the fatal error handling away from abusing the output layer and grepping for errors in it. Instead, we use [error_get_last()](http://php.net/error_get_last). This way, call to statements such as `echo`, `var_dump` and so on will directly surface. This will be part of XP 6, see xp-framework/rfc#172