helpers/generate_common.sh: protect against remote HEAD change
We have to do this because of two reasons. One is that upstream can
change HEAD if they wish and remote update won't pick up on that. We
would stay on previous HEAD.
The second actual reason is that we in the past were using simple
git clone --bare to create mirror and in combination of
sets local HEAD to the first cloned branch not to the remote HEAD.
This simply removes the mirror as that is probably the easiest way to get the correct remote HEAD reference.
Might be fix for #285