Make AddHistory ignore blank lines and lines starting with space.
Make NewLiner return an error when the standard input is not a terminal.
Introduce IsTerminal() to check interactive mode.