X509CertificateTest: add test for negative serial

Update cert tests to save the private keys and also change the main
certificate to a negative serial to exercise more corner cases.

Change-Id: Ia59eece8ced0988b140ebf2e932b54298047f32d
42 files changed