Switch stdout to line buffering

Use line buffering (instead of block buffering) so that messages arrive
immediately in systemd-journald, tail -f debug.log, and the like.
Merge pull request #4175

283e405 Switch stdout to line buffering (shshshsh)