git-prompt.sh: refactor colored prompt code

__git_ps1_colorize_gitstring() sets color codes and
builds the prompt gitstring. It has duplicated code
to handle color codes for bash and zsh shells.
__git_ps1() also has duplicated logic to build the
prompt gitstring.

Remove duplication of logic to build gitstring in
__git_ps1_colorize_gitstring() and __git_ps1().

Leave in __git_ps1_colorize_gitstring() only logic
to set color codes.
git-prompt.sh: do not print duplicate clean color code

Do not print a duplicate clean color code when there
is no other indicators other than the current branch
in colored prompt.
git-prompt.sh: add missing information in comments

Mention that the command below is needed for prompt
in ZSH with PS1:
  setopt PROMPT_SUBST

Make it clear that colored prompt is only available
in PROMPT_COMMAND mode.