RT #85922 - CGI-Compile: alarm doesn't work inside compiled script

Hi as requested a fix + tests
I changed my solution as it failed an existing test.  Now localizing SIG is optional.