Reimplement permanently-register-io-thread-event for SMPability.
Remove permanent tentries (waiting thread entries) from
io-registrations. Replace them with an event wrapper that loops,
re-registering after the wrapped event finishes. The loop assumes IO
is being consumed during the event. If not, it may spin forever.
Remove the notion of registering for the "front" of the queue too.
The X graphics device must take care to de-register its IO event
before closing the display, else the thread system may apply test-
select-registry to a closed descriptor.