Disable the timer signal while blocked in select() (#5991)
Disable the timer signal while blocked in select() (#5991)

The threaded RTS had a fix for this a long time ago (#1623) but this
patch applies a similar fix to the non-threaded RTS.

MERGED from commit dd24d6bc37879c6b32a3d5ac4ee765e59e13501c

ilyasergey/GHC-XAppFix,ilyasergey/GHC-XAppFix,ilyasergey/GHC-XAppFix,ilyasergey/GHC-XAppFix