shell: detect tmux and send different escape codes

This allows to change the scheme from within tmux.

From the tmux CHANGES (1.5):

  * Support passing through escape sequences to the underlying terminal by
    using DCS with a "tmux;" prefix.

Source:
http://permalink.gmane.org/gmane.comp.terminal-emulators.tmux.user/1324

Ref: https://github.com/morhetz/gruvbox/issues/4#issuecomment-30083929
Shell syntax fixes (POSIX): \e, \a and [[

This is required for when the script is executed (and not sourced), and
/bin/sh is not linked to zsh/bash/...
Handle GNU screen
Merge pull request #111 from blueyed/tmux-dcs

shell: detect tmux and send different escape codes