Fix potential UB in `term_input::read_stdin`
Fix potential UB in `term_input::read_stdin`

This code in `term_input::read_stdin`:

    buf.reserve(100);
    unsafe {
        buf.set_len(old_len + 100);
    }

is potentially UB as after `set_len`, `buf` will have uninitialized
memory. The relevant clippy lint page says using `std::io::Read::read`
on uninitialized part of the vector leads to undefined behavior, without
elaborating on why:

    https://rust-lang.github.io/rust-clippy/master/index.html#uninit_vec

We don't use `std::io::Read::read`, but if the problem is converting the
uninitialized memory into a slice, then we have the same problem.

With this commit we use `libc::read` instad of `nix::unistd::read`,
which takes a pointer argument rather than a `mut` slice. This way we
avoid setting the vector's length before reading into the memory and
generating a slice with uninitialized memory.

Another advantage of the new code is we now set the vector's length only
once, when we read into it. Previously we would set the length after
`Vec::reserve`, do the read, and then update the length again depending
on how many bytes were read.

See also discussion:

    https://users.rust-lang.org/t/reading-from-fd-into-uninitialized-memory/70424

osa1/tiny,osa1/tiny