Flush syscallbuf before terminating trace in response to SIGINT/SIGTERM.

Also makes term_trace_cpu much more aggressive about sending SIGINT
as soon as possible, before any syscallbuf flushing has happened.

This fixes an intermittent failure in term_trace_cpu where the tracee might
not reach a syscallbuf flush before it was terminated, even though the test
waited for a whole second before sending the signal. In general, this change
prevents the final lines of syscallbuf-buffered output from being lost.