[libvirt] PATCH: Convert lots of code to new memory APIs