[PATCH v2 12/21] qemu: refactor qemuDomain[Attach|Detach]DeviceConfig