[PATCH v1 31/34] qemuDomainNamespaceTeardownMemory: Deduplicate code