(PUP-3446) Self-sign REST interface test x509 certificate

Not calling OpenSSL::X509::Certificate#sign on a new certificate
produces invalid ASN.1 output, as the signing algorithm fields are left
empty. Versions of OpenSSL prior to 1.0.1i accepted this invalid ASN.1,
which is why this problem went unnoticed. Without this patch, this test
fails on any system with OpenSSL 1.0.1i or newer.

This fix signs the certificate with the private key used to generate
it, producing a self-signed certificate with valid ASN.1. This allows
all tests to pass with OpenSSL 1.0.1i.
This might fail if we run the specs on platforms that don't have SHA256. Granted this is probably old terrible systems with OpenSSL 0.9.old, so I don't know how much we care.