gc.sh: do not lose a detached HEAD
Officially Girocco does not support any repositories having anything
other than a symbolic-ref HEAD into the refs/heads/... namespace.
However, there's nothing to stop a perverse adminstrator from
creating a detached HEAD using the command line.
Make sure that any such detached HEAD ends up in the main (and
bitmapped for non-forks) pack during a repack operation.
Without this change if a detached HEAD were otherwise unreachable
it would eventually be lost.
But henceforth it shall be lost no more.
Signed-off-by: Kyle J. McKay <mackyle@gmail.com>