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.
Pretty sure, as long as NID_algorithm is excluded (which I do here). It ends up being a duplicate of NID_rc2_ecb. Not really sure what it's purpose is (I'm only really interested in decoding the subject name).

`grep '#define NID' /usr/include/openssl/objects.h` lists them relatively conveniently. I suppose we could automate extraction, but I'm not sure it's worth it.