gpg: Do not return "Legacy Key" from lookup if a key is expired.
* g10/getkey.c (lookup): Map GPG_ERR_LEGACY_KEY.
If an expired key is directly followed by a legacy key in the keyring,
the lookup function incorrectly returned "legacy key" instead of
"unusable key". We fix it by handling not found identical to a legacy
key if the last finish lookup failed.
- Signed-off-by: Werner Koch <wk@gnupg.org>