CardOS 5 driver for OpenSC

This change builds upon existing CardOS 4 code to implement a CardOS 5
driver for OpenSC. CardOS 4 and 5 differ substantially.  The code
currently supports on-card generation and storage of RSA keys up to 2048
bits in modulus.

Support for 4096-bit RSA keys is still defective. I'm currently
investigating why.

The driver was tested using the following commands:

$ pkcs15-init -C --so-pin 12345678 --so-puk 12345678
$ pkcs15-init --store-pin --auth-id 01 --label potato --pin 1234 --puk 1234 --so-pin 12345678
$ pkcs15-init --generate-key rsa/2048 --auth-id 01 --pin 1234 --so-pin 12345678

(or)

$ openssl genrsa 2048 > /tmp/openssl-privkey
$ pkcs15-init --store-private-key /tmp/openssl-privkey --id 45 --auth-id 01 --pin 1234 --so-pin 12345678

And subsequently:

$ ssh-agent ksh
$ ssh-add -s /usr/lib/opensc-pkcs11.so
$ ssh-add -L > /tmp/x && ssh-keygen  -e -m PEM -f /tmp/x > /tmp/y && ssh-add -T /tmp/y && echo ok

(where ssh-add -T is an extension to OpenSSH's ssh-add command that generates a random buffer, submits it to the agent to sign and then verifies the signature).

edit: Fixed typo. Added test commands.
As far as I can see, everything that can be done with sc_asn1_put_tag can also be done with bertlv_put_tag (ignoring the buf_t type). What about replacing sc_asn1_put_tag?

I am not sure, but I think cwa_compose_tlv and tlv_get are implementing the same functionality as bertlv_put_tag. If so, this should be unified.