factor: Don’t wrap stdin in BufReader & use lock()
factor: Don’t wrap stdin in BufReader & use lock()

stdin() is already buffered.

Locking upfront explicitely avoid the overhead of mutex locking/unlocking
everytime a new line is read. See https://stackoverflow.com/a/17546731
and https://www.reddit.com/r/rust/comments/3rj54u/how_can_i_read_char_by_char_from_stdin/cwpojn1/

The code cannot be simplified to “for line in stdin().lock().lines()”
until non-lexical lifetimes are implemented. The compiler complains at
the moment about a temporary value not living long enough/being dropped
while still borrowed. See https://github.com/rust-lang/rust/issues/33520

This commit is related to issue #1103.

uutils/coreutils,uutils/coreutils,uutils/coreutils