helpers/generate_common.sh: use HEAD instead of master

The master is not default for all repositories and there are some
existing repositories that migrated to the different default branch
name. The git provides instead generic alias HEAD for current branch
that on remote is resolved to the default branch and thus to master or
what it is called in that project. The issue is that while HEAD works
when we fetch we can't use it for checkout because it references the
local HEAD in that case. We have to use FETCH_HEAD instead as that is
the reference git gives to head fetched from the remote server.
7 jobs for bugfix/generate-checkout-default in 5 minutes and 19 seconds (queued for 8 seconds)
Status Job ID Name Coverage
  Build
passed lists_generate #575226

00:00:10

passed medkit_mox #575223

00:05:19

passed medkit_omnia #575224

00:04:33

passed medkit_turris1x #575225

00:02:14

passed prepare_mox #575220

00:02:21

passed prepare_omnia #575221

00:02:21

passed prepare_turris1x #575222

00:02:23