Shell: fixed interactive mode detection for piped stdin.
Previously, libedit callback API (rl_callback_read_char) was used for
interactive input processing. Unlike the blocking readline() API, the
callback interface does not work correctly when stdin is a pipe: input
characters are silently dropped and the line handler is never invoked.
The issue was introduced in
4988565c6ea7 (0.8.0).
The fix is to check isatty(STDIN_FILENO) and fall back to the file
processing mode when stdin is not a terminal.