get_terminal_width checks both STDIN and STDOUT

changed get_terminal_width() of ttyutils.c to check both STDIN and STDOUT (instead of just STDIN) before resorting to $COLUMNS.
Not sure why it was checking the size of STDIN to begin with. Maybe it should be checking STDOUT/STDERR instead?
'ls /bin | column' now uses STDOUT's width.
'ls /bin | column | cat' still uses the default width (because get_env("COLUMNS") returns NULL)