KVM: selftests: Split out helper to allocate guest mem via memfd