[libvirt] [PATCHv2] threads: add one-time initialization support