gpg-protcol: refactor keyinfo parsing