Make gclient_scm.py use cache_dir

Instead of having custom logic for dealing with cache directories, use
git_cache.py to populate caches.

Also fixes a bug in git_cache.py where it was looking for lockfiles in cwd rather than the cache dir.

Other changes:
* _Run now returns output.
* Always print to stdout in CheckCallAndFilterOutput, even if it gets a carriage return.  This is done because git progress report are carriage returns and not newlines and we don't want everything on the same line and not strip out the CRs.
* Removed members changed tests, its not very useful to know a new import is added.

BUG=339171

Review URL: https://codereview.chromium.org/180243006

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@254248 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/git_cache.py b/git_cache.py
index 3fc6a16..6b430f8 100755
--- a/git_cache.py
+++ b/git_cache.py
@@ -240,8 +240,9 @@
     url = args[0]
     repo_dirs = [os.path.join(options.cache_dir, UrlToCacheDir(url))]
   else:
-    repo_dirs = [path for path in os.listdir(options.cache_dir)
-                 if os.path.isdir(path)]
+    repo_dirs = [os.path.join(options.cache_dir, path)
+                 for path in os.listdir(options.cache_dir)
+                 if os.path.isdir(os.path.join(options.cache_dir, path))]
   lockfiles = [repo_dir + '.lock' for repo_dir in repo_dirs
                if os.path.exists(repo_dir + '.lock')]
 
@@ -255,6 +256,9 @@
   for repo_dir in repo_dirs:
     lf = Lockfile(repo_dir)
     if lf.break_lock():
+      config_lock = os.path.join(repo_dir, 'config.lock')
+      if os.path.exists(config_lock):
+        os.remove(config_lock)
       unlocked.append(repo_dir)
     else:
       untouched.append(repo_dir)