Fix test-select-registry to "atomically" unmask interrupts.
When SMPing the machine cannot miss e.g a global-GC interrupt, else
the whole world grinds to a halt. Using (set-interrupt-enables!
interrupt-mask/all) and then (test-select-registry ... #t) admits a
small "hole" wherein such an interrupt can drop, allowing the machine
to block without realizing it missed an interrupt intended to wake it.
The test-select-registry primitive does not actually "atomically
unmask interrupts" but simply ignores the mask inside its critical
section -- as if the mask was interrupt-mask/all.
Adjust branches so that, when not blocking, the simpler poll/select is
called (rather than ppoll/pselect).
Eliminate loops that re-try after masked interrupts arrive since all
interrupts are considered unmasked here.