Flush emails when using memory spooling

Added flush call when memory spooling is being used.
Changes are based on SwiftmailerBundle's EmailSenderListener.