tools: t404: redesign treatment of 'reader' option
tools: t404: redesign treatment of 'reader' option

in previous version
first of all the 'reader' option's value was converted to hexadecimal form,
used as ATR value
and all present readers where scanned to find the inserted card with such ATR.
Only after this the 'reader' option was used as reader's number or reader's name.

Currently in use the 'hex-to-bin' procedure accepts for conversion one digit,
and so even if the 'reader' option value is one digit,
the useless search over all present readers take place.

In the current version the order of checks if kept (ATR, reader's number, reader's name),
but enforced the validity check of ATR, presented by 'reader' option.
Also the option is accepted as reader's number only if the 'entire' option's string can be converted to integer.

Thanks to 'jbwisemo' for cooperation.
https://www.opensc-project.org/opensc/ticket/404

dengert/OpenSC,ieugen/OpenSC,gemini/OpenSC,metsma/OpenSC,dirkx/OpenSC.tokend,Jakuje/OpenSC,mtrojnar/OpenSC,0x7678/OpenSC,frankmorgner/OpenSC,mouse07410/OpenSC,hhonkanen/OpenSC,CardContact/OpenSC,hongquan/OpenSC-main,LudovicRousseau/OpenSC,dirkx/OpenSC.tokend,philipWendland/OpenSC,dirkx/OpenSC,rickyepoderi/OpenSC,l1k/OpenSC,OpenSC/OpenSC,frankmorgner/OpenSC,fabled/OpenSC,dengert/OpenSC,0x7678/myOpenSC,0x7678/OpenSC,fabled/OpenSC,marschap/pkg-opensc,frankmorgner/OpenSC,tidatida/OpenSC,jpki/OpenSC,dirkx/OpenSC,rickyepoderi/OpenSC,0x7678/myOpenSC,kasparsd/opensc-latvia-id,0x7678/myOpenSC,LudovicRousseau/OpenSC,metsma/OpenSC,aobaid/OpenSC,financeX/OpenSC,aobaid/OpenSC,CardContact/OpenSC,hhonkanen/OpenSC,Jakuje/OpenSC,fabled/OpenSC,mtrojnar/OpenSC,hongquan/OpenSC-main,nmav/OpenSC,tidatida/OpenSC,adminmt/OpenSC,nmav/OpenSC,adminmt/OpenSC,rickyepoderi/OpenSC,germanblanco/OpenSC,UIKit0/OpenSC,viktorTarasov/OpenSC-SM,AktivCo/OpenSC,aobaid/OpenSC,velter/OpenSC,carlhoerberg/OpenSC,financeX/OpenSC,ieugen/OpenSC,jpki/OpenSC,carlhoerberg/OpenSC,hhonkanen/OpenSC,UIKit0/OpenSC,viktorTarasov/OpenSC-SM,l1k/OpenSC,financeX/OpenSC,philipWendland/OpenSC,0x7678/myOpenSC,financeX/OpenSC,Jakuje/OpenSC,OpenSC/OpenSC,jpki/OpenSC,fabled/OpenSC,dirkx/OpenSC.tokend,metsma/OpenSC,AktivCo/OpenSC,velter/OpenSC,tidatida/OpenSC,l1k/OpenSC,marschap/pkg-opensc,mouse07410/OpenSC,LudovicRousseau/OpenSC,carlhoerberg/OpenSC,UIKit0/OpenSC,0x7678/myOpenSC,UIKit0/OpenSC,dirkx/OpenSC.tokend,gemini/OpenSC,ieugen/OpenSC,martinpaljak/OpenSC,dirkx/OpenSC,nmav/OpenSC,frankmorgner/OpenSC,AktivCo/OpenSC,CardContact/OpenSC,marschap/pkg-opensc,martinpaljak/OpenSC,Jakuje/OpenSC,aobaid/OpenSC,velter/OpenSC,germanblanco/OpenSC,philipWendland/OpenSC,hongquan/OpenSC-main,mouse07410/OpenSC,0x7678/OpenSC,kasparsd/opensc-latvia-id,dirkx/OpenSC,carlhoerberg/OpenSC,velter/OpenSC,mtrojnar/OpenSC,adminmt/OpenSC,carlhoerberg/OpenSC,dirkx/OpenSC.tokend,gemini/OpenSC,dengert/OpenSC,OpenSC/OpenSC,marschap/pkg-opensc,martinpaljak/OpenSC,viktorTarasov/OpenSC-SM,germanblanco/OpenSC,0x7678/OpenSC,ieugen/OpenSC,tidatida/OpenSC,kasparsd/opensc-latvia-id,dirkx/OpenSC,adminmt/OpenSC,kasparsd/opensc-latvia-id,dirkx/OpenSC.tokend,financeX/OpenSC,ieugen/OpenSC