[libvirt] [PATCH v13 37/49] extract general code of NodeDeviceDetach