fix certificate validity encoding

Currently, phpseclib does not comply with RFC3280 section 4.1.2.5 Validity, as it always encodes signed certificate time stamps as generalTime, although notBefore and notAfter MUST be encoded as utcTime if they are before 2050.
This leads to openssl warnings:
  Warning:  openssl_x509_parse(): illegal ASN1 data type for timestamp

This patch fixes this by checking for the year and choosing utcTime or generalTime accordingly.