Fix GitCheckout to be sane and use git-cache
Fix GitCheckout to be sane and use git-cache

The commit queue uses checkout.GitCheckout to manage the
local git repository. It resets it to a clean state,
commits patches locally, and pushes those changes to the
golden-source-of-truth repo.

This CL fixes the prepare() method to use the new git-cache
tool, and in the process makes it more consistent, more
readable, and more correct. It also makes minor changes to
other methods to bring them in line with the git-cache
approach.

R=iannucci@chromium.org, rmistry@chromium.org
BUG=261619

Review URL: https://codereview.chromium.org/175873003

git-svn-id: fd409f4bdeea2bb50a5d34bb4d4bfc2046a5a3dd@256681 0039d316-1c4b-4281-b951-d872f2087c98

kromain/chromium-tools,HackFisher/depot_tools,smikes/depot_tools,smikes/depot_tools,azunite/chrome_build,G-P-S/depot_tools,yetu/repotools,Phonebooth/depot_tools,fracting/depot_tools,hsharsha/depot_tools,aleonliao/depot_tools,duanwujie/depot_tools,eatbyte/depot_tools,azureplus/chromium_depot_tools,disigma/depot_tools,ajohnson23/depot_tools,aleonliao/depot_tools,smikes/depot_tools,liaorubei/depot_tools,fanjunwei/depot_tools,Neozaru/depot_tools,ajohnson23/depot_tools,kromain/chromium-tools,smikes/depot_tools,fanjunwei/depot_tools,sarvex/depot-tools,duanwujie/depot_tools,duongbaoduy/gtools,Neozaru/depot_tools,cpanelli/-git-clone-https-chromium.googlesource.com-chromium-tools-depot_tools,michalliu/chromium-depot_tools,npe9/depot_tools,cpanelli/-git-clone-https-chromium.googlesource.com-chromium-tools-depot_tools,xuyuhan/depot_tools,chinmaygarde/depot_tools,fanjunwei/depot_tools,HackFisher/depot_tools,michalliu/chromium-depot_tools,cybertk/depot_tools,azureplus/chromium_depot_tools,kaiix/depot_tools,mlufei/depot_tools,Phonebooth/depot_tools,primiano/depot_tools,eatbyte/depot_tools,primiano/depot_tools,liaorubei/depot_tools,withtone/depot_tools,gcodetogit/depot_tools,Midrya/chromium,cybertk/depot_tools,hsharsha/depot_tools,Chilledheart/depot_tools,kaiix/depot_tools,Chilledheart/depot_tools,Neozaru/depot_tools,gcodetogit/depot_tools,Chilledheart/depot_tools,azureplus/chromium_depot_tools,duongbaoduy/gtools,airtimemedia/depot_tools,chinmaygarde/depot_tools,primiano/depot_tools,Neozaru/depot_tools,Phonebooth/depot_tools,withtone/depot_tools,cpanelli/-git-clone-https-chromium.googlesource.com-chromium-tools-depot_tools,duongbaoduy/gtools,HackFisher/depot_tools,SuYiling/chrome_depot_tools,xuyuhan/depot_tools,michalliu/chromium-depot_tools,hsharsha/depot_tools,fracting/depot_tools,G-P-S/depot_tools,yetu/repotools,fanjunwei/depot_tools,npe9/depot_tools,airtimemedia/depot_tools,CoherentLabs/depot_tools,SuYiling/chrome_depot_tools,Neozaru/depot_tools,yetu/repotools,G-P-S/depot_tools,fracting/depot_tools,Chilledheart/depot_tools,aleonliao/depot_tools,G-P-S/depot_tools,CoherentLabs/depot_tools,Chilledheart/depot_tools,xuyuhan/depot_tools,airtimemedia/depot_tools,eatbyte/depot_tools,HackFisher/depot_tools,cybertk/depot_tools,sarvex/depot-tools,npe9/depot_tools,Midrya/chromium,azunite/chrome_build,liaorubei/depot_tools,chinmaygarde/depot_tools,SuYiling/chrome_depot_tools,Midrya/chromium,cybertk/depot_tools,kromain/chromium-tools,cybertk/depot_tools,disigma/depot_tools,withtone/depot_tools,kaiix/depot_tools,sarvex/depot-tools,kromain/chromium-tools,sarvex/depot-tools,azunite/chrome_build,npe9/depot_tools,Phonebooth/depot_tools,airtimemedia/depot_tools,duanwujie/depot_tools,mlufei/depot_tools,disigma/depot_tools,liaorubei/depot_tools,mlufei/depot_tools,smikes/depot_tools,xuyuhan/depot_tools,ajohnson23/depot_tools,gcodetogit/depot_tools,michalliu/chromium-depot_tools,eatbyte/depot_tools