gpg: Fix two other cases in get_best_pubkey_byname.
* g10/getkey.c (pubkey_cmp): Handle a primary key with PUBKEY_USAGE_ENC, and make sure new key is for encryption. (get_best_pubkey_byname): Add comment for ranking.
- GnuPG-bug-id: T4713
- Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>