Cleanup SSL_CLIENT_CERT before saving it in $_SESSION

Based on code from
https://github.com/fkooman/php-cert-parser/blob/master/src/fkooman/X509/CertParser.php