virsh: Extract common code from cmdCPU{Compare,Baseline}
virsh: Extract common code from cmdCPU{Compare,Baseline}

Both cpu-compare and cpu-baseline commands accept more that just CPU
definition XML(s). For users' convenience they are able to extract the
CPU definition(s) even from domain XML or capabilities XML. The main
differences between the two commands is in the number of CPU definitions
they expect: cpu-compare wants only one CPU definition while
cpu-baseline expects one or more CPUs.

The extracted code forms a new vshExtractCPUDefXML function.

Signed-off-by: Jiri Denemark <62bdf77dc47919a4d59a91822129d14633cfca81@redhat.com>
Reviewed-by: Ján Tomko <4cab11cfb98d3c937327354a78eb07dbb6ee2bc6@redhat.com>

nertpinx/libvirt,olafhering/libvirt,zippy2/libvirt,eskultety/libvirt,jardasgit/libvirt,jardasgit/libvirt,crobinso/libvirt,eskultety/libvirt,jardasgit/libvirt,olafhering/libvirt,eskultety/libvirt,jardasgit/libvirt,olafhering/libvirt,fabianfreyer/libvirt,libvirt/libvirt,nertpinx/libvirt,zippy2/libvirt,fabianfreyer/libvirt,libvirt/libvirt,eskultety/libvirt,crobinso/libvirt,libvirt/libvirt,nertpinx/libvirt,olafhering/libvirt,nertpinx/libvirt,andreabolognani/libvirt,zippy2/libvirt,andreabolognani/libvirt,crobinso/libvirt,jfehlig/libvirt,andreabolognani/libvirt,andreabolognani/libvirt,jfehlig/libvirt,jfehlig/libvirt,jardasgit/libvirt,fabianfreyer/libvirt,fabianfreyer/libvirt,zippy2/libvirt,andreabolognani/libvirt,libvirt/libvirt,crobinso/libvirt,eskultety/libvirt,nertpinx/libvirt,fabianfreyer/libvirt,jfehlig/libvirt