shell-common: make the diff "alias" only use color for ttys

colordiff doesn't make the choice on it's own, and in this instance it's
caused problems occasionally.  So let's use a shell function to detect
whether stdout is connected to a terminal or not.  If not, then omit the
color.