Right now, if lio registered zero jobs, syscall frees lio job structure, cleaning up queued ksi. As result, the realtime signal is dequeued and never delivered.
Fix it by allowing sendsig() to copy ksi when job count is zero.
Note that the same problem exists with the registered knote that is deleted from all kqueues on synchronous cleanup, but this one is harder to fix.
PR: 220398
NB. There are some style and comment fixes, I will commit this separately.