gpgme-tool: Return more detailed XML from KEYLIST
src/gpgme-tool.c (cmd_keylist): Convert output from a list of
to more detailed XML.
(xml_preamble1, xml_preamble2, xml_end): Make global.
(result_add_protocol, result_add_validity): New functions for
generating XML from GPGME types.
(result_add_string): Treat NULL strings as "".
(result_xml_tag_data): Make 'data' a 'const char' so we can use the
value returned by gpgme_get_protocol_name directly.
--
This is a first pass at returning most of the gpgme_key_t data from the
KEYLIST call.
Signed-off-by: W. Trevor King <wking@tremily.us>