io-wq: fix races around manager/worker creation and task exit