[libvirt PATCH v2 3/4] qemu: Refactor qemuDomainAdjustMaxMemLock()