[PATCH 1/2] qemu: Move memory device coldplug into a separate function