gpg: Change parse_packet to take a context.