libxkutil: Improve domain.os_info cleanup
libxkutil: Improve domain.os_info cleanup

The union fields in os_info were set by means of XML parsing which
doesn't take into account that certain fields are depending on the
virtualization type.
This could lead both to memory overwrites and memory leaks.
Fixed by using temporary variables and type-based setting of fields

Signed-off-by: Viktor Mihajlovski <a96a137ca8976b5ff3114c85be7aeb3b6464dad7@linux.vnet.ibm.com>

libvirt/libvirt-cim,libvirt/libvirt-cim,libvirt/libvirt-cim