Use project object in _uploadPack in gerrit driver

During playing around with mypy I found out that the _uploadPack
method actually expects the project name but is called with the
project object from every caller. This actually worked by accident as
formatting the project object results in the correct string due to the
__str__ method. Nevertheless this is incorrect and should be
fixed. Additionally add some type annotations there.

Change-Id: Ia066d6cade04db1fe6e01102e70c774660ae4327
diff --git a/zuul/driver/gerrit/gerritconnection.py b/zuul/driver/gerrit/gerritconnection.py
index 63f3093..d23857f 100644
--- a/zuul/driver/gerrit/gerritconnection.py
+++ b/zuul/driver/gerrit/gerritconnection.py
@@ -25,8 +25,10 @@
 import queue
 import voluptuous as v
 
+from typing import Dict, List
+
 from zuul.connection import BaseConnection
-from zuul.model import Ref, Tag, Branch
+from zuul.model import Ref, Tag, Branch, Project
 from zuul import exceptions
 from zuul.driver.gerrit.gerritmodel import GerritChange, GerritTriggerEvent
 
@@ -614,7 +616,7 @@
                                    (record.get('number'),))
         return changes
 
-    def getProjectBranches(self, project):
+    def getProjectBranches(self, project: Project) -> List[str]:
         refs = self.getInfoRefs(project)
         heads = [str(k[len('refs/heads/'):]) for k in refs.keys()
                  if k.startswith('refs/heads/')]
@@ -711,8 +713,8 @@
             chunk, more_changes = _query_chunk("%s %s" % (query, resume))
         return alldata
 
-    def _uploadPack(self, project_name):
-        cmd = "git-upload-pack %s" % project_name
+    def _uploadPack(self, project: Project) -> str:
+        cmd = "git-upload-pack %s" % project.name
         out, err = self._ssh(cmd, "0000")
         return out
 
@@ -757,7 +759,7 @@
             raise Exception("Gerrit error executing %s" % command)
         return (out, err)
 
-    def getInfoRefs(self, project):
+    def getInfoRefs(self, project: Project) -> Dict[str, str]:
         try:
             data = self._uploadPack(project)
         except: