conf: Fix virDomainObjGetDefs when getting persistent config on a live vm
conf: Fix virDomainObjGetDefs when getting persistent config on a live vm

If @flags contains only VIR_DOMAIN_AFFECT_CONFIG and @vm is active, the
function would return the active config rather than the persistent one
that it should return. This happened due to the fact that
virDomainObjGetDefs was checking the updated flags which may not contain
VIR_DOMAIN_AFFECT_LIVE if it is not requested even if @vm is active.

Additionally the function would not take the flags into account when
setting the pointers which was later used to determine whether the code
needs to update the given configuration.

The mistake was caught by the virt-test suite.

jardasgit/libvirt,datto/libvirt,VenkatDatta/libvirt,eskultety/libvirt,eskultety/libvirt,agx/libvirt,VenkatDatta/libvirt,crobinso/libvirt,taget/libvirt,agx/libvirt,agx/libvirt,taget/libvirt,jardasgit/libvirt,VenkatDatta/libvirt,VenkatDatta/libvirt,datto/libvirt,nertpinx/libvirt,taget/libvirt,fabianfreyer/libvirt,zippy2/libvirt,crobinso/libvirt,rlaager/libvirt,libvirt/libvirt,rlaager/libvirt,rlaager/libvirt,datto/libvirt,nertpinx/libvirt,eskultety/libvirt,jardasgit/libvirt,fabianfreyer/libvirt,taget/libvirt,jfehlig/libvirt,jfehlig/libvirt,jardasgit/libvirt,zippy2/libvirt,rlaager/libvirt,andreabolognani/libvirt,andreabolognani/libvirt,andreabolognani/libvirt,datto/libvirt,olafhering/libvirt,olafhering/libvirt,jfehlig/libvirt,crobinso/libvirt,nertpinx/libvirt,olafhering/libvirt,andreabolognani/libvirt,eskultety/libvirt,crobinso/libvirt,rlaager/libvirt,VenkatDatta/libvirt,eskultety/libvirt,fabianfreyer/libvirt,taget/libvirt,jfehlig/libvirt,zippy2/libvirt,agx/libvirt,andreabolognani/libvirt,fabianfreyer/libvirt,libvirt/libvirt,zippy2/libvirt,nertpinx/libvirt,jardasgit/libvirt,fabianfreyer/libvirt,datto/libvirt,olafhering/libvirt,libvirt/libvirt,libvirt/libvirt,nertpinx/libvirt,agx/libvirt