virt: Add get_iface functions for libvirt_xml module.

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>
virt-libvirt: Add test for virsh attach|detach interface.

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>