Support emacs terminals

I use shell mode in emacs all the time, which has the wonderful trait of setting TERM=dumb whilst still supporting colours and ansi escapes.

Bah.

So, here's a patch to enable the parts of prezto that work with emacs.