Improve XMPP protocol support for starttls on s_client 

I submit this patches time ago to the [openssl mailing list](https://rt.openssl.org/Ticket/Display.html?id=2860&user=guest&pass=guest) but got not answer. 
I have rebased the patches on top of current master and I'm retrying submitting it here with the hope that it will caught more attention.

This pull request fixes the support for XMPP on openssl s_client. A number of reports on Internet complain about this. Examples:

* https://bugs.launchpad.net/ubuntu/+source/openssl/+bug/654493
* https://bugzilla.redhat.com/show_bug.cgi?id=608239
* http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=671672
* https://rt.openssl.org/Ticket/Display.html?user=guest&pass=guest&id=2638
* https://rt.openssl.org/Ticket/Display.html?id=2812&user=guest&pass=guest