Introduce FindCommonGitCommit

Instead of relying on the base changeset IDs coming from the shelveset,
the first git commit that is found to contain the exact SHA1 for all
the files in the shelveset is used as the parent.