3.0 - Persistent SMTP connections

As already mentioned in #3013, I'd like to suggest support for persistent SMTP connections. They are especially useful when batch sending mails (newsletters, mailing lists, notifications, etc...), as most hosters do apply certain rate limiting like a maximum of x connections per y time.

Contrary to how it's done in the `Socket` class, this patch introduces a `connected()` method to test for an active connection. I think it's cleaner and easier to test/mock if necessary, and I'm wondering if it would be a good idea to expose something similar on the `Socket` class too, ie wrap `$connected` into a method?

I'm not sure if there are any conventions regarding this, but it would allow mocking and using expectations instead of making use of `Socket::$connected` (as can be seen in this patch's tests), also there seems to be no reason why the outside world should be able to change the exposed connection state without actually affecting the connection.

This is kind of a question for a new ticket, but since it would affect this patch's tests I thought I'd ask right here.
No luck, the only app that made use of it stopped using it some time ago, and of course I didn't commented the change well enough, maybe I came to the same conclusion as you, I don't remember... I'll drop it for now.