[libvirt] [PATCH 4/7] qemu: Split out SPICE port allocation into a separate function