odb_pack: fix race condition
odb_pack: fix race condition

last_found is the last packfile a wanted object was found in. Since
last_found is shared among all searching threads, it might changes while
we're searching. As suggested by @arrbee, put a copy on the stack to fix
the race condition.

falqas/libgit2,jflesch/libgit2-mariadb,maxiaoqian/libgit2,skabel/manguse,joshtriplett/libgit2,kenprice/libgit2,linquize/libgit2,yosefhackmon/libgit2,saurabhsuniljain/libgit2,iankronquist/libgit2,mrksrm/Mingijura,raybrad/libit2,maxiaoqian/libgit2,falqas/libgit2,chiayolin/libgit2,skabel/manguse,raybrad/libit2,Aorjoa/libgit2_maked_lib,linquize/libgit2,kenprice/libgit2,MrHacky/libgit2,dleehr/libgit2,jflesch/libgit2-mariadb,skabel/manguse,JIghtuse/libgit2,linquize/libgit2,rcorre/libgit2,mcanthony/libgit2,raybrad/libit2,amyvmiwei/libgit2,chiayolin/libgit2,JIghtuse/libgit2,zodiac/libgit2.js,nokiddin/libgit2,nacho/libgit2,jamieleecool/ptest,yongthecoder/libgit2,sim0629/libgit2,rcorre/libgit2,ardumont/libgit2,zodiac/libgit2.js,Corillian/libgit2,yosefhackmon/libgit2,Aorjoa/libgit2_maked_lib,jflesch/libgit2-mariadb,mcanthony/libgit2,raybrad/libit2,whoisj/libgit2,spraints/libgit2,claudelee/libgit2,skabel/manguse,mingyaaaa/libgit2,JIghtuse/libgit2,saurabhsuniljain/libgit2,sim0629/libgit2,stewid/libgit2,MrHacky/libgit2,ardumont/libgit2,saurabhsuniljain/libgit2,t0xicCode/libgit2,oaastest/libgit2,mingyaaaa/libgit2,linquize/libgit2,zodiac/libgit2.js,joshtriplett/libgit2,linquize/libgit2,iankronquist/libgit2,swisspol/DEMO-libgit2,jeffhostetler/public_libgit2,oaastest/libgit2,jeffhostetler/public_libgit2,Snazz2001/libgit2,spraints/libgit2,raybrad/libit2,mingyaaaa/libgit2,oaastest/libgit2,mcanthony/libgit2,leoyanggit/libgit2,mhp/libgit2,Tousiph/Demo1,since2014/libgit2,iankronquist/libgit2,Corillian/libgit2,magnus98/TEST,jflesch/libgit2-mariadb,skabel/manguse,sim0629/libgit2,skabel/manguse,yongthecoder/libgit2,MrHacky/libgit2,swisspol/DEMO-libgit2,yosefhackmon/libgit2,JIghtuse/libgit2,nokiddin/libgit2,ardumont/libgit2,jeffhostetler/public_libgit2,claudelee/libgit2,whoisj/libgit2,kissthink/libgit2,KTXSoftware/libgit2,chiayolin/libgit2,whoisj/libgit2,KTXSoftware/libgit2,evhan/libgit2,mingyaaaa/libgit2,Snazz2001/libgit2,yongthecoder/libgit2,mrksrm/Mingijura,mingyaaaa/libgit2,jeffhostetler/public_libgit2,Tousiph/Demo1,yosefhackmon/libgit2,mrksrm/Mingijura,stewid/libgit2,mrksrm/Mingijura,kenprice/libgit2,stewid/libgit2,jflesch/libgit2-mariadb,MrHacky/libgit2,mhp/libgit2,maxiaoqian/libgit2,leoyanggit/libgit2,JIghtuse/libgit2,evhan/libgit2,t0xicCode/libgit2,yongthecoder/libgit2,claudelee/libgit2,jamieleecool/ptest,maxiaoqian/libgit2,spraints/libgit2,joshtriplett/libgit2,kissthink/libgit2,jamieleecool/ptest,sim0629/libgit2,since2014/libgit2,rcorre/libgit2,sygool/libgit2,linquize/libgit2,Tousiph/Demo1,yosefhackmon/libgit2,claudelee/libgit2,mrksrm/Mingijura,spraints/libgit2,KTXSoftware/libgit2,yongthecoder/libgit2,falqas/libgit2,iankronquist/libgit2,sim0629/libgit2,JIghtuse/libgit2,saurabhsuniljain/libgit2,whoisj/libgit2,ardumont/libgit2,falqas/libgit2,Tousiph/Demo1,amyvmiwei/libgit2,Corillian/libgit2,t0xicCode/libgit2,spraints/libgit2,since2014/libgit2,mhp/libgit2,kissthink/libgit2,mhp/libgit2,mcanthony/libgit2,Aorjoa/libgit2_maked_lib,amyvmiwei/libgit2,Snazz2001/libgit2,nokiddin/libgit2,stewid/libgit2,claudelee/libgit2,claudelee/libgit2,MrHacky/libgit2,rcorre/libgit2,saurabhsuniljain/libgit2,magnus98/TEST,stewid/libgit2,nacho/libgit2,chiayolin/libgit2,joshtriplett/libgit2,evhan/libgit2,yongthecoder/libgit2,whoisj/libgit2,swisspol/DEMO-libgit2,t0xicCode/libgit2,oaastest/libgit2,since2014/libgit2,Tousiph/Demo1,since2014/libgit2,nacho/libgit2,kenprice/libgit2,maxiaoqian/libgit2,chiayolin/libgit2,mingyaaaa/libgit2,mhp/libgit2,ardumont/libgit2,Corillian/libgit2,nokiddin/libgit2,KTXSoftware/libgit2,magnus98/TEST,yosefhackmon/libgit2,leoyanggit/libgit2,maxiaoqian/libgit2,sygool/libgit2,swisspol/DEMO-libgit2,mcanthony/libgit2,ardumont/libgit2,t0xicCode/libgit2,spraints/libgit2,joshtriplett/libgit2,falqas/libgit2,nokiddin/libgit2,sygool/libgit2,rcorre/libgit2,dleehr/libgit2,zodiac/libgit2.js,kenprice/libgit2,jeffhostetler/public_libgit2,sygool/libgit2,sygool/libgit2,Corillian/libgit2,mrksrm/Mingijura,joshtriplett/libgit2,Snazz2001/libgit2,mhp/libgit2,Snazz2001/libgit2,mcanthony/libgit2,dleehr/libgit2,MrHacky/libgit2,Aorjoa/libgit2_maked_lib,kenprice/libgit2,amyvmiwei/libgit2,Corillian/libgit2,Snazz2001/libgit2,amyvmiwei/libgit2,oaastest/libgit2,leoyanggit/libgit2,iankronquist/libgit2,rcorre/libgit2,kissthink/libgit2,dleehr/libgit2,leoyanggit/libgit2,oaastest/libgit2,falqas/libgit2,Tousiph/Demo1,magnus98/TEST,swisspol/DEMO-libgit2,nokiddin/libgit2,dleehr/libgit2,nacho/libgit2,KTXSoftware/libgit2,stewid/libgit2,jamieleecool/ptest,whoisj/libgit2,saurabhsuniljain/libgit2,dleehr/libgit2,KTXSoftware/libgit2,sim0629/libgit2,jflesch/libgit2-mariadb,t0xicCode/libgit2,leoyanggit/libgit2,kissthink/libgit2,jeffhostetler/public_libgit2,Aorjoa/libgit2_maked_lib,amyvmiwei/libgit2,evhan/libgit2,iankronquist/libgit2,kissthink/libgit2,sygool/libgit2,zodiac/libgit2.js,chiayolin/libgit2,magnus98/TEST,swisspol/DEMO-libgit2,since2014/libgit2,magnus98/TEST