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