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.
Changed this to use a bit nicer version in  thekid/core@a9c42dd33d395f59624275c8fbd7fff9e9996b6e