sclang: terminal client - fix and simplify request handling

The previous implementation could miss sig_stop and sig_recompile requests,
if they were issued between handling the request and clearing the request
flag.

This change corrects the algorithm, while slightly increasing the chance
that the same request needs to be performed multiple times if issued in
close succession.