Remove any whitespace character in the certificate

When the certificate doesn't start with `-----BEGIN CERTIFICATE-----`, it gets created from the certificate string. To comply with the [RFC 5280][1], any whitespace character in the certificate needs to be removed see: [RFC 4518][2] and [RFC 4354][3].
However the `\n` regex pattern only matches the newlines, not all whitespace character. Therefor use the `\s` regex pattern which does match all whitespace character (tabs, spaces, newlines ect.).
This also prevents the `nested asn1` error in `OpenSSL::X509::Certificate`.

[1]: http://www.heise.de/netze/rfc/rfcs/rfc5280.shtml "7.1.  Internationalized Names in Distinguished Names"
[2]: http://www.heise.de/netze/rfc/rfcs/rfc4518.shtml "2.2.  Map"
[3]: http://www.ietf.org/rfc/rfc3454.txt "B. Mapping Tables"