WebAgg: flush stdout after printing, redirect "stopped" message to stder... [backport to 1.4.x]

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