do not add a logger if app logger is empty.

Within `Application.php` a logger is always added to the app by default, only the value of this logger is `null`.
The check against `isset` doesn't stop the DbalLogger of being added even if the app logger is null.

I've added a UnitTest that required the `class_exist` being mocked since `Symfony\Bridge\Doctrine\Logger\DbalLogger` is not within the default test loading and for testing this is needed.
this is not mocking the function, it is hacking the function (it will impact the whole testsuite).

Using such hack for mocking functions works only if you isolate each test in a separate process. Otherwise it creates really weird issues