Actually check out the branch in the jobdir

This *actually* checks out the branch in the staged git repos
on the executor, rather than checking out the branch tip commit
as a detached head.

Change-Id: I2edb79d14f51ef61f74745d2409df8f89ba70589
diff --git a/zuul/merger/merger.py b/zuul/merger/merger.py
index 2ca5d59..6cfd904 100644
--- a/zuul/merger/merger.py
+++ b/zuul/merger/merger.py
@@ -182,8 +182,10 @@
 
     def checkoutLocalBranch(self, branch):
         repo = self.createRepoObject()
-        ref = repo.heads[branch].commit
-        self.checkout(ref)
+        # Perform a hard reset before checking out so that we clean up
+        # anything that might be left over from a merge.
+        reset_repo_to_head(repo)
+        repo.heads[branch].checkout()
 
     def cherryPick(self, ref):
         repo = self.createRepoObject()