libxl: don't set hasManagedSave when performing save
libxl: don't set hasManagedSave when performing save

libxlDoDomainSave() is used in both the save and managedsave code
paths but was unconditionally setting hasManagedSave to true on
success. As a result, undefine would fail after a non-managed
save/restore operation. E.g.

virsh define; virsh start
virsh save; virsh restore
virsh shutdown
virsh undefine
error: Refusing to undefine while domain managed save image exists

Modify libxlDoDomainSave() to take an additional parameter to
specify managed vs non-managed save, and change callers to use it.

Signed-off-by: Jim Fehlig <39929b5b86d72d51fceac59b52303e3fe8a3083e@suse.com>
Reviewed-by: Daniel P. Berrangé <bb938cf255e055ff3507f2627d214e8e62118fcf@redhat.com>

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