console: don't use colored output if there's no TTY

This prevents ANSI escape codes and style tags showing up in
cron-jobs, pipes or redirects.
Merge pull request #4477 from mfn/mfn-console-output-isatty

console: don't use colored output if there's no TTY