x509: add the api needed to obtain entries by nid

Also includes a large list of nids (from openssl/object.h). Might be
transcoding errors on my part there.
Are you sure that these are defined contiguously starting from 0 in OpenSSL?