Show tag instead of commit id if available.

Updated the implementation of git_prompt_info so that tag name
is shown when a tag points to the commit where HEAD points to
in detached mode.