Intercept php errors v2

We already have the option to log unhandled exceptions.
Let's log also PHP fatal errors.

Having a class that holds both exceptions and errors help us optimize code and avoid logging duplicated errors.

Supersedes #1609