ASN.1 bug fixes and additions

This patch fixes a few bugs (crashes) and adds basic support for constructed elements and teletex strings.

I also changed `src/misc/pk_get_oid.c` because designated initializers are new to C99 which isn't supported in Visual Studio 2005 or 2008.