WebAgg: flush stdout after printing, redirect "stopped" message to stderr

Without flushing, the message can be displayed too late. KeyboardInterrupt message should be printed to stderr.