Added special SwiftMailerHandler that flushes mail queue if necessary

This PR is intended as a fix for https://github.com/symfony/symfony-standard/issues/425.
The SwiftMailerHandler would probably have to go into the Monolog bridge in Symfony. I can create a PR there if this solution is accepted.

@Seldaek Please comment if this is a viable solution.