Test runner displays colors even when running in parallel, closes #9388, #732

By wrapping `io::stdio()` with `LineBufferedWriter`, it is guaranteed `write` is called only once per lines.

I also added `flush` method in order to display a `test <testname> ...` message before the test begins to run. This message helps you to know the progress.