[libvirt PATCH 1/2] nodedev: refactor mdevctl thread functions