Terminate on input/output stop signals.

When an application asks for input from standard input, and the input
has not been redirected, the application receives a stop signal, which
caused the monitor to hang. We could solve this by not making the
application a session leader, but this causes some trouble with the
interaction of exit() and children processes. This commit makes the
monitor print a message, and terminated the application.

Note that this situation should not be expected to happen on batch jobs,
but it does happen when testing the monitor on the command line.