When SSL handshake fails report the peer cert

If the SSL connection fails due to invalid peer's SSL certificate it is very
convenient to have the certificate in the error handler to show it to the user.
The common use case would be to display the certificate to user and ask for
confirmation.

This patch retrieves the certificate and gives it to users' code along side the
NSError.