Add doctest checks for resulting certificate

Use explicit not_before and not_after settings.
Check PEM version of resulting certificate (this is now constant).
Check parameters of resulting certificate.