Use cached branch list in dynamic config

When performing a dynamic reconfiguration, we currently ask
sources for a list of all branches on all projects.  This takes
about 2.5 minutes at openstack production scale.  Instead, since
there should not be any changes to branches introduced by a
dynamic reconfiguration, use the previously cached list of branches.

The dictionary referenced here has an entry for every project branch
regardless of whether there is any configuration in that branch, so
it is an effective cache of all branches.

Change-Id: I5a1d7e2a04891aff18277b67f4ea7c890dd91899
diff --git a/zuul/configloader.py b/zuul/configloader.py
index c0ea9cf..eb5a0aa 100644
--- a/zuul/configloader.py
+++ b/zuul/configloader.py
@@ -1492,7 +1492,9 @@
         if trusted:
             branches = ['master']
         else:
-            branches = project.source.getProjectBranches(project, tenant)
+            # Use the cached branch list; since this is a dynamic
+            # reconfiguration there should not be any branch changes.
+            branches = project.unparsed_branch_config.keys()
 
         for branch in branches:
             fns1 = []