iothread: check iothread->ctx before aio_context_unref to avoid assertion