gpg: Minor cleanup for key listing related code.