git-prompt.sh: factor out coloring logic

So that we can extend it with ZSH-colors later.

Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>