Revert "Use weakref for change cache"

This reverts commit b9704302bdb6857026319ac80df7b490a2282f89.

This is strongly suspected of causing a memory leak.

Change-Id: I0ebf9cee304277909a0b80420ac7ba659a437b29
diff --git a/tests/unit/test_scheduler.py b/tests/unit/test_scheduler.py
index 9090421..6efc43f 100755
--- a/tests/unit/test_scheduler.py
+++ b/tests/unit/test_scheduler.py
@@ -875,8 +875,7 @@
         # already (without approvals), we need to clear the cache
         # first.
         for connection in self.connections.connections.values():
-            if hasattr(connection, '_change_cache'):
-                connection._change_cache.clear()
+            connection.maintainCache([])
 
         self.executor_server.hold_jobs_in_build = True
         A.addApproval('Approved', 1)
@@ -946,8 +945,7 @@
 
         self.log.debug("len %s" % self.fake_gerrit._change_cache.keys())
         # there should still be changes in the cache
-        self.assertNotEqual(len(list(self.fake_gerrit._change_cache.keys())),
-                            0)
+        self.assertNotEqual(len(self.fake_gerrit._change_cache.keys()), 0)
 
         self.executor_server.hold_jobs_in_build = False
         self.executor_server.release()
@@ -3933,8 +3931,7 @@
         self.assertEqual(B.data['status'], 'NEW')
 
         for connection in self.connections.connections.values():
-            if hasattr(connection, '_change_cache'):
-                connection._change_cache.clear()
+            connection.maintainCache([])
 
         self.executor_server.hold_jobs_in_build = True
         B.addApproval('Approved', 1)