MyEID: always select in mode 'return FCI template'

According to ch.4.2 of MyEID reference manual v1.7.6 the only possible value of P2 of 'SELECT' APDU is '00'.
For this reason, when caller do not request to return 'sc_file' data,
use the non-null dummy 'sc_file' pointer in the call of iso->select_file,
and thus avoid the P2 different from '00'.

Also log calls are replaced by its short forms,
and resolved the 'trailing spaces' issues.
pkcs11: #439: 'SEQUENCE' of 'SET' issue when comparing cert attributes

Thanks to 'crank'.
https://www.opensc-project.org/opensc/ticket/439

Some pkcs11 callers (i.e. netscape) will pass in the ASN.1 encoded SEQUENCE OF SET,
while OpenSC just keeps the SET in the issuer/subject field.
pkcs11-tool: #407: on Windows use O_BINARY open file mode

https://www.opensc-project.org/opensc/ticket/407
http://msdn.microsoft.com/en-us/library/ee2849wt%28v=VS.71%29.aspx
libopensc: Make OPENSC_DEBUG environment variable without conf file

 * Make the OPENSC_DEBUG environment variable work even when no
   conf file is available.

https://www.opensc-project.org/opensc/ticket/388

Signed-off-by: Viktor Tarasov <viktor.tarasov@gmail.com>
doc: #377: no optional parameters for sc_context_create()

thanks to 'TimBarton'.
libopensc: #311: possible memory corruption

Thanks to 'frankmpunkt'.
pkcs15: #268: Wrong ASN1 tagging of GOSTR3401Key

"The encoding of {public,private}GOSTR3410Key uses tag [CONTEXT 3] which is reserved for KEAKey.
Caused by the fact, that the specifications (pkcs15,iso) don't define a encoding for GOST,
the genericKey encoding [CONTEXT 4] from iso-7816 should be used." (Andre)
pkcs11: #371: Public key create template should not include CKA_MODULUS_BITS

Thanks to 'z22' and Martin.
Merge remote-tracking branch 'upstream/staging' into staging
pkcs11: #162,#370,#115,#413: reselect application DF issue

Limit the number of cases when applicated re-selection of application DF to strict minimum.
I.e. only when pkcs11 login session is not locked and private key PKCS#15 object do not
contain the 'path' attribute.
doc: #329: explicit usage of --id for a new keys is deprecated

'Id' option in the pkcs15-init commands to import/generate a new key
is deprecated. Better s to let the MW to derive an identifier from
the key material.
opensc-explorer: allow filename-pattern as argument to 'ls'

Make ls more flexible and more similar to the UNIX ls.
Added support for SmartCard-HSM and ECC keys

modified:   src/libopensc/Makefile.am
new file:   src/libopensc/card-sc-hsm.c
new file:   src/libopensc/card-sc-hsm.h
modified:   src/libopensc/cards.h
modified:   src/libopensc/ctx.c
modified:   src/libopensc/pkcs15-prkey.c
new file:   src/libopensc/pkcs15-sc-hsm.c
modified:   src/libopensc/pkcs15-syn.c
Added obj files to Makefile.mak for windows build
Fixed WIN32 compiler errors
Adjusted log message calls to short form

modified:   src/libopensc/Makefile.mak
modified:   src/libopensc/card-sc-hsm.c
modified:   src/libopensc/pkcs15-sc-hsm.c
Activated ECDSA for SmartCard-HSM
Fixed issues in pkcs11-tool/test_signature is card has RSA and ECDSA keys
Fixed bug in sc_pkcs11_signature_size that returns the wrong ECDSA signature size
sc-hsm: fixed to be compiled with Microsoft VC
sc-hsm: Added support for ECDH
sc-hsm: Undo the change to mechanism.c in commit f24bcd346340d80b552c0859942a49fd5e8feeff
sc-hsm: Change ECDSA signature format from DER to r/s format
pkcs11-tool: implement 'find mechanism from the given list'

and use it when testing signature
Revert change to pkcs11-tool because of upstream changes in RSA signature tests
Fixed a typo that went undetected