block/nbd: correctly use qio_channel_detach_aio_context when needed