Use emacs for git commit messages

Attempts to launch emacs in a terminal and connect to an already
running emacs-server.

Change-Id: I10fdb892ceb461af5ee7a56d1d875bd72025ac1a
Set TERM to 256 colors if supported

This makes sure that we set the TERM to xterm-256colors while using
gnome or xfce4 terminal.

Change-Id: I98fa2c917668e06b4075b27f8cbd701d76acb751