Move to unified error codes and remove assorted cruft
Pull out very repetitive parts of parsing
Parse v3 extensions: keyUsage, extendedKeyUsage, basicConstraints

So far, no validation on the extensions is done. That is, extendedKeyUsage could disallow uses allowed in keyUsage.