Implemented the buxton_wire_get_key_type function in protocol.c

Also added some print statements to daemon.c, and fixed some debug
output typos in buxton_wire_get_message that could cause confusion.