git: do not checkout the cached source tree when switching versions.
git: do not checkout the cached source tree when switching versions.

In the context of multiple versions we must not touch the source tree
inside BB_TMP_DIR. Otherwise, multiple parallel running processes will
always decide to redownload the source code from git causing all kinds
of catastrophic errors.

We first attempt a light fix by using git worktrees. Here we continue to
clone a non-bare repository into BB_TMP_DIR. Instead of a git checkout
to the correct version, we now add a new worktree of the correct version
into the user's project build directory.

This should keep the data races out.

PolyJIT/benchbuild,PolyJIT/benchbuild,PolyJIT/benchbuild,PolyJIT/benchbuild