IO manager: Edit the timeout queue directly, rather than using an edit list

Fixes #7653.
Add a test for #7653
Replace all atomicModifyIORef calls in GHC.Event.TimerManager

with atomicModifyIORef' calls. I'm not sure if it was causing any
problems, but I don't think there's any reason they couldn't be
strict, and it's safer this way.