OpenPGP: refactor error handling in pgp_store_key()
OpenPGP: refactor error handling in pgp_store_key()

* use LOG_TEST_*() macros instead of explicit coding
* harmonize use of card->ctx: saves one variable
* explictly compare pointers to != NULL

viktorTarasov/OpenSC-SM,fabled/OpenSC,metsma/OpenSC,frankmorgner/OpenSC,fabled/OpenSC,LudovicRousseau/OpenSC,Jakuje/OpenSC,rickyepoderi/OpenSC,AktivCo/OpenSC,Jakuje/OpenSC,mouse07410/OpenSC,LudovicRousseau/OpenSC,philipWendland/OpenSC,dengert/OpenSC,philipWendland/OpenSC,hhonkanen/OpenSC,metsma/OpenSC,Jakuje/OpenSC,hongquan/OpenSC-main,hhonkanen/OpenSC,viktorTarasov/OpenSC-SM,fabled/OpenSC,CardContact/OpenSC,dengert/OpenSC,fabled/OpenSC,frankmorgner/OpenSC,frankmorgner/OpenSC,hhonkanen/OpenSC,AktivCo/OpenSC,hongquan/OpenSC-main,mouse07410/OpenSC,rickyepoderi/OpenSC,hongquan/OpenSC-main,philipWendland/OpenSC,CardContact/OpenSC,dengert/OpenSC,mouse07410/OpenSC,AktivCo/OpenSC,frankmorgner/OpenSC,LudovicRousseau/OpenSC,viktorTarasov/OpenSC-SM,OpenSC/OpenSC,rickyepoderi/OpenSC,OpenSC/OpenSC,metsma/OpenSC,OpenSC/OpenSC,CardContact/OpenSC,Jakuje/OpenSC