[SourcesManager] Ensure the master repo is shallow cloned

Closes https://github.com/CocoaPods/CocoaPods/issues/2586.