Move some ASN.1 internals to asn1_int.h