virsh: Add a helper to parse cpulist
virsh: Add a helper to parse cpulist

The 'virsh vcpupin' and 'virsh emulatorpin' commands use the same
code to parse the cpulist. This patch abstracts the same code as
a helper. Along with various code style fixes, and error improvement
(only error "Physical CPU %d doesn't exist" if the specified CPU
exceed the range, no "cpulist: Invalid format", see the following
for an example of the error prior to this patch).

% virsh vcpupin 4 0 0-8
error: Physical CPU 4 doesn't exist.
error: cpulist: Invalid format.

jfehlig/libvirt,zhlcindy/libvirt-1.1.4-maintain,andreabolognani/libvirt,crobinso/libvirt,olafhering/libvirt,libvirt/libvirt,zhlcindy/libvirt-1.1.4-maintain,zippy2/libvirt,VenkatDatta/libvirt,crobinso/libvirt,shugaoye/libvirt,cbosdo/libvirt,andreabolognani/libvirt,shugaoye/libvirt,zhlcindy/libvirt-1.1.4-maintain,jardasgit/libvirt,jardasgit/libvirt,eskultety/libvirt,fabianfreyer/libvirt,elmarco/libvirt,jardasgit/libvirt,rlaager/libvirt,rlaager/libvirt,taget/libvirt,datto/libvirt,shugaoye/libvirt,nertpinx/libvirt,fabianfreyer/libvirt,nertpinx/libvirt,rlaager/libvirt,taget/libvirt,libvirt/libvirt,shugaoye/libvirt,zippy2/libvirt,andreabolognani/libvirt,datto/libvirt,agx/libvirt,nertpinx/libvirt,zhlcindy/libvirt-1.1.4-maintain,elmarco/libvirt,andreabolognani/libvirt,elmarco/libvirt,jardasgit/libvirt,crobinso/libvirt,elmarco/libvirt,VenkatDatta/libvirt,VenkatDatta/libvirt,jfehlig/libvirt,jfehlig/libvirt,eskultety/libvirt,olafhering/libvirt,rlaager/libvirt,nertpinx/libvirt,zippy2/libvirt,VenkatDatta/libvirt,datto/libvirt,datto/libvirt,cbosdo/libvirt,eskultety/libvirt,zhlcindy/libvirt-1.1.4-maintain,eskultety/libvirt,jardasgit/libvirt,agx/libvirt,fabianfreyer/libvirt,shugaoye/libvirt,elmarco/libvirt,taget/libvirt,cbosdo/libvirt,taget/libvirt,rlaager/libvirt,olafhering/libvirt,agx/libvirt,eskultety/libvirt,nertpinx/libvirt,crobinso/libvirt,taget/libvirt,jfehlig/libvirt,fabianfreyer/libvirt,VenkatDatta/libvirt,fabianfreyer/libvirt,olafhering/libvirt,libvirt/libvirt,libvirt/libvirt,zippy2/libvirt,agx/libvirt,agx/libvirt,cbosdo/libvirt,datto/libvirt,andreabolognani/libvirt,cbosdo/libvirt