Fix bashisms in mate-autogen

Based on GNOME commit:
https://git.gnome.org/browse/gnome-common/commit/?id=101362218645db3f0fbb55e1e6ea80c4bd70f97d
mate-autogen: Don't print terminal codes if stdin isn't a tty

Otherwise this shows up as garbage in log files.

Based on GNOME commit:
https://git.gnome.org/browse/gnome-common/commit/?id=7f977b0214623142819c8b7a08839949fb9f3ec0
Fix srcdir!=builddir for Scrollkeeper

Gnome BUGS urls:
http://bugzilla.gnome.org/show_bug.cgi?id=315320
http://bugzilla.gnome.org/show_bug.cgi?id=409060
http://bugzilla.gnome.org/show_bug.cgi?id=685388

Based on GNOME commits:
https://git.gnome.org/browse/gnome-common/commit/?id=1b2fb3fb47405908eb53d0db46329a64a1697a59
https://git.gnome.org/browse/gnome-common/commit/?id=960b1bde8d156f61340500a260402264c5320603
https://git.gnome.org/browse/gnome-common/commit/?id=ee12b92340223bb33b9da232132c44cacecc7968
Check for glibtoolize in gnome-autogen.sh

Gnome BUG url:
http://bugzilla.gnome.org/show_bug.cgi?id=564558

Based on GNOME commit:
https://git.gnome.org/browse/gnome-common/commit/?id=70422b555f881acc7523818bdea22dea84dd5901
Trace AC_CONFIG_SUBDIRS with autoconf

Find configure.ac and configure.in files using the trace functionality of autoconf in order to
skip build directories from incomplete make distcheck runs.

GNOME bug url:
http://bugzilla.gnome.org/show_bug.cgi?id=510713

Based on GNOME commit:
https://git.gnome.org/browse/gnome-common/commit/?id=4668cc8250c15119dc7bdbbf842da53f4fe478fe
Better support of using AUTOCONF environment variable

Gnome bug url:
http://bugzilla.gnome.org/show_bug.cgi?id=510713

Based on GNOME commit:
https://git.gnome.org/browse/gnome-common/commit/?id=4bb2a2450f67550ae761c75cb7ff2325bad54c8b
Read the dirlist file unconditionally

Based on GNOME commit:
https://git.gnome.org/browse/gnome-common/commit/?id=799ae3eaebd82f961cbca82325351c3b5db7494c