sync: Get the upstream for a package from Git

In some cases (as is the case for us at Network Box), all the packages
in a given Distro do not come from the same Upstream.

We then need a way to find the Upstream for each Package.

The way we chose to follow here at Network Box is to respect a certain
naming convention in our Git branches.

As a result, we can identify which was the latest upstream branch merged
in the branch for the current Distro.
gitbase: Move the subprocessing to a decorator

This removes the additional method from the GitBase class.

As a result, the code is much closer to what it would be if we didn't
hit that GitPython bug: we'd just have to drop the decorator, and
everything would just work.
gitbase: Keep the cloned dirs around

This should speed up the upstream branch retrieval quite a lot, as it
means we won't have to clone every single time.

It is a bit dangerous though, as anything else than uptrack could modify
the cloned trees. :-/

If that turns out to be the wrong tradeoff between speed and security,
we'll revert this change.
gitbase: Use a proper exception

ValueError really wasn't the right thing here...
sync: Catch errors to find the git branch