Replace Monolog middlewares by an event listener

This is an alternative to the changes introduced by #894 in order to allow replacement of the logging middlewares.
Instead of having a Closure for each listener, this PR introduces a listener class.
The listener can be used independently from the MonologServiceProvider.

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #870
| License       | MIT
| Doc          | yes