Fix per-file owners check for deleted files.

Previously if you deleted a file that you had per-file owners on, it would fail
the owners check. This fixes that.

Originally, owners.Database used glob to enumerate the directory and added all
the matching files in the directory to some dicts holding the owners
information. If a CL deleted a file, it'd no longer be on the filesystem, so it
wouldn't be in these dicts. There'd be no per-file owners information for it.

With this patch, the Database no longer enumerates individual files. It instead
keeps track of the glob patterns and checks the CL's files against the patterns
at lookup time.

BUG=622381
TEST=tests/owners_unittest.py && tests/owners_finder_test.py  # Unit test included.

Review-Url: https://codereview.chromium.org/2148153002
diff --git a/git_cl.py b/git_cl.py
index 70d7e18..6a59cda 100755
--- a/git_cl.py
+++ b/git_cl.py
@@ -13,7 +13,6 @@
 from multiprocessing.pool import ThreadPool
 import base64
 import collections
-import glob
 import httplib
 import json
 import logging
@@ -2721,7 +2720,7 @@
         reviewers.append(name)
     if add_owners_tbr:
       owners_db = owners.Database(change.RepositoryRoot(),
-        fopen=file, os_path=os.path, glob=glob.glob)
+        fopen=file, os_path=os.path)
       all_reviewers = set(tbr_names + reviewers)
       missing_files = owners_db.files_not_covered_by(change.LocalPaths(),
                                                      all_reviewers)
@@ -4841,7 +4840,7 @@
       [f.LocalPath() for f in
           cl.GetChange(base_branch, None).AffectedFiles()],
       change.RepositoryRoot(), author,
-      fopen=file, os_path=os.path, glob=glob.glob,
+      fopen=file, os_path=os.path,
       disable_color=options.no_color).run()