cli: Implement line buffering in print_stats()
Console output is incredibly slow on Windows, which is aggravated by the lack of line buffering. As a result, a significant percentage of overall runtime is actually spent displaying the decoding progress.
Doing the line buffering manually alleviates most of the issue.