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.
Also I think this conversion to UTF8 better to be a method of `Asn1String` as it might be used in other places too sometime.