Retry a SSL connection if ssl crashes on illegal certificates.

A ssl crash can happen when sending to servers with self-signed certificates.

Also contains the iconv patches from an earlier branch.