scd: Detect external interference when PCSC_SHARED.
* scd/app-common.h (check_aid): New method. * scd/app-openpgp.c (do_check_aid): New. * scd/app-piv.c (do_check_aid): New. * scd/app.c (check_external_interference): New. (maybe_switch_app): Check interference to determine switching is needed.
- GnuPG-bug-id: T5484
- Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>