Extend in-repo config update support to github

The code that would look for in-repo config changes was gerrit specific.
Turn the gerrit specific bit into a generic that drivers can implement.

Implement the generic in the github driver, which required accounting
for files that are part of a push event (where code is landing in the
repo we care about).

Also remove an unnecessary fake pull request method of getPushEvent, as
there was already one in the fake github class.

Move the real updatesConfig function from the Change object to the Ref
object (since we can get a change from a ref) and move the files
attribute as well.

Introduce a test for github to verify that the tenant is reconfigured.
This required introducing a new Scheduler object attribute to track when
each tenant is reconfigured. The existing reconfiguration time tracker
was generic, and not updated via dyanmic updates.

Change-Id: Ibf59f91fa3701c15d93d859920fe3070478fe457
Story: 2000774
Task: 4664
diff --git a/tests/base.py b/tests/base.py
index 65ded50..b78495d 100755
--- a/tests/base.py
+++ b/tests/base.py
@@ -592,21 +592,6 @@
     def getPullRequestClosedEvent(self):
         return self._getPullRequestEvent('closed')
 
-    def getPushEvent(self, old_sha, ref='refs/heads/master'):
-        name = 'push'
-        data = {
-            'ref': ref,
-            'before': old_sha,
-            'after': self.head_sha,
-            'repository': {
-                'full_name': self.project
-            },
-            'sender': {
-                'login': 'ghuser'
-            }
-        }
-        return (name, data)
-
     def addComment(self, message):
         self.comments.append(message)
         self._updateTimeStamp()
@@ -896,7 +881,8 @@
         self.pull_requests.append(pull_request)
         return pull_request
 
-    def getPushEvent(self, project, ref, old_rev=None, new_rev=None):
+    def getPushEvent(self, project, ref, old_rev=None, new_rev=None,
+                     added_files=[], removed_files=[], modified_files=[]):
         if not old_rev:
             old_rev = '00000000000000000000000000000000'
         if not new_rev:
@@ -908,7 +894,14 @@
             'after': new_rev,
             'repository': {
                 'full_name': project
-            }
+            },
+            'commits': [
+                {
+                    'added': added_files,
+                    'removed': removed_files,
+                    'modified': modified_files
+                }
+            ]
         }
         return (name, data)