OpenPGP: revert 7b4532736e0c7923b972aa22344d156760b40adf

PKCS#15 spec v1.1 says:
TokenInfo.version: This field contains the number of the particular version
of this specification the application is based upon. For this version of this
document, the value of version shall be 0 (v1).

Thanks to Martin Paljak for the finding.
OpenPGP: parse more (extended) capabilities on init

* parse more extened capabilities & features into a private enum
* for v2.0 cards, always parse the "historical bytes" DO
  reason: ATR may be static and thus cannot reflect the state
OpenPGP: remove unnecessary call to sc_get_data
OpenPGP: stricter validity checks in PKCS15 init

Only add private/public keys that habe been defined:
check finger prints & algorithm identifier
OpenPGP: parse more (extended) capabilities on init

* parse more extened capabilities & features into a private enum
* for v2.0 cards, always parse the "historical bytes" DO
  reason: ATR may be static and thus cannot reflect the state
OpenPGP: correct PIN type to UTF-8

OpenPGP card spec v1.1 and v2.0 make it absolutely clear:
"... The format of the CHVs is UTF-8 (case sensitive) ...".
OpenPGP: fix access conditions for DOs

Follow the specs.
opensc-explorer: document new command line parameter SCRIPT
opensc-explorer: do not use hard-coded string length

Determine length of prefix dynamically instead of using a hard-coded, common
value for all prefixes.
opensc-explorer: use case-insensitive pin types in PACE
opensc-explorer: update documentation
OpenPGP: first go at openpgp-tool
opensc-explorer: allow acting as script interpreter

Take a filename as argument and interpret the commands in it.
opensc-explorer: add 'echo' command

Add 'echo' command that simply displays its arguments.

With the recently committed script interpreter feature and this echo command,
nice litte scripts can be written, like e.g.

 $ cat opengpg-userinfo
 #!/usr/bin/opensc-explorer
 cd 0065
 echo Name:
 cat 005B
 echo Language:
 cat 5F2D
 echo Gender:
 cat 5F35
 quit
opensc-explorer: better names for some functions
pkcs11: prepare internal API for multi-application mode

- simplify some of framework handles: remove from it's prototype the arguments that can be derived from the other arguments;
for exemple: foo(slot, slot->card) --> foo(slot)
- add the 'application' argument to the bind, unbind and similar handles;
- preview more then one framework data attached to the pkcs11card object.
- placehold for the future 'derive' and 'can_do' handles.
pkcs15: new procedure to get application by it's symbolic name

At the moment symbolic names for the on-card applications are 'generic', 'protected'.
This distinction used by pkcs11 and minidriver module to select the
'master' application in the cases when only reduced number of slots (one)
can be exposed by module (minidriver) or particular configuration (pkcs11).
pkcs11: create tokens and slots for multiple on-card applications

In card detection procedure bind all present applications
and create tokens for them.

Treatement of the different 'create-slots' configuration cases,
joining the objects from different applications into one slot
are previewed for the next commits.
pkcs15: new procedure to find an Auth PKCS#15 object (PIN) by flags
pkcs15init: change sc_pkcs15init_bind() prototype

Add new argument 'application-info',
that will allow to select the on-card application to by binded with.

pkcs11: use sc_pkcs15init_bind with 'AID' argument

Prototype of sc_pkcs15init_bind() has been changed to add argument with
AID of the on-card application to be binded with.