Topic: do not use '(detached' when detached

If we launch 'git branch' when we are detached from HEAD and if the
locale is set to English (LANG=C), we will have:

    * (detached from head)
      master
      (...)

Then the topic will be '(detached': not so pretty and incorrect
according to Yuriy Taraday;

Also, it's maybe better to use a copy of 'os.environ' to only add
environment variables for this single command and not for all next
commands which will be launched in this processus.

PS: added a new test to check if this new feature works correctly
PS2: 'git checkout --detach' has been introduced in git 1.7.5. It's
     maybe better to use 'git checkout BRANCH^0' instead.
PS3: handle the case where $LANG is not defined and correctly add this
     environment variable

Change-Id: I8bc74c5ed28de08038e07cfd37efbaf1c4f4e78f
Merge "Topic: do not use '(detached' when detached"