virsh: domain: Extract the code converting domain job stats to virDomainJobInfo
virsh: domain: Extract the code converting domain job stats to virDomainJobInfo

To simplify the stats printer code we convert the new statistics from
the typed parameter list into the old stats structure.

Extract this code since it takes a lot of space.

Signed-off-by: Peter Krempa <2cf5c04c61aa466e4a47bfedc747d17279c72ffc@redhat.com>
Reviewed-by: Eric Blake <a9da18479c871fe903d9590822cfe2629c6a4d11@redhat.com>

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