add sched_yield in RWTicketSpinLock
add sched_yield in RWTicketSpinLock

Summary:
This diff makes RWTicketSpinLock eventually start calling
sched_yield() during shared and aggressive exclusive lock access, to
avoid pathologies that can arise when the number of threads far
exceeds the number of actual cores.

Test Plan:
1. unit tests
2. benchmark w/o + w/ diff

Reviewed By: nathan@fb.com

FB internal diff: D524897

kernelim/folly,PPC64/folly,juniway/folly,guker/folly,shaobz/folly,upsoft/folly,raphaelamorim/folly,zhiweicai/folly,ajtulloch/folly,doctaweeks/folly,charsyam/folly,tomhughes/folly,bikong2/folly,fw1121/folly,kernelim/folly,juniway/folly,SeanRBurton/folly,raphaelamorim/folly,bowlofstew/folly,PPC64/folly,gavioto/folly,mqeizi/folly,Eagle-X/folly,sonnyhu/folly,lifei/folly,guker/folly,doctaweeks/folly,fw1121/folly,hongliangzhao/folly,kernelim/folly,Eagle-X/folly,colemancda/folly,PPC64/folly,chjp2046/folly,constantine001/folly,sakishum/folly,gavioto/folly,tempbottle/folly,bobegir/folly,reddit/folly,ykarlsbrun/folly,facebook/folly,hongliangzhao/folly,shaobz/folly,theiver9827/folly,SammyK/folly,juniway/folly,PoisonBOx/folly,doctaweeks/folly,Orvid/folly,ajtulloch/folly,nickhen/folly,gaoyingie/folly,theiver9827/folly,facebook/folly,doctaweeks/folly,leolujuyi/folly,charsyam/folly,hongliangzhao/folly,sakishum/folly,upsoft/folly,rklabs/folly,loverszhaokai/folly,clearlinux/folly,raphaelamorim/folly,charsyam/folly,Eagle-X/folly,xzmagic/folly,mqeizi/folly,colemancda/folly,sonnyhu/folly,project-zerus/folly,lifei/folly,SammyK/folly,ykarlsbrun/folly,lifei/folly,brunomorishita/folly,tempbottle/folly,facebook/folly,stonegithubs/folly,constantine001/folly,reddit/folly,charsyam/folly,KSreeHarsha/folly,floxard/folly,mqeizi/folly,nickhen/folly,loverszhaokai/folly,brunomorishita/folly,clearlylin/folly,unmeshvrije/C--,cppfool/folly,project-zerus/folly,cppfool/folly,upsoft/folly,stonegithubs/folly,bowlofstew/folly,bowlofstew/folly,sakishum/folly,SammyK/folly,upsoft/folly,bikong2/folly,colemancda/folly,stonegithubs/folly,arg0/folly,ykarlsbrun/folly,kernelim/folly,cole14/folly,floxard/folly,tempbottle/folly,romange/folly,sakishum/folly,mqeizi/folly,SeanRBurton/folly,clearlinux/folly,nickhen/folly,bsampath/folly,SeanRBurton/folly,wildinto/folly,zhiweicai/folly,bobegir/folly,leolujuyi/folly,rklabs/folly,gaoyingie/folly,renyinew/folly,bsampath/folly,yangjin-unique/folly,project-zerus/folly,nickhen/folly,cppfool/folly,clearlylin/folly,romange/folly,alexst07/folly,upsoft/folly,wildinto/folly,colemancda/folly,brunomorishita/folly,xzmagic/folly,tomhughes/folly,Orvid/folly,KSreeHarsha/folly,Hincoin/folly,Orvid/folly,zhiweicai/folly,chjp2046/folly,ajtulloch/folly,raphaelamorim/folly,mqeizi/folly,wildinto/folly,fw1121/folly,leolujuyi/folly,zhiweicai/folly,yangjin-unique/folly,clearlinux/folly,cole14/folly,brunomorishita/folly,renyinew/folly,PoisonBOx/folly,juniway/folly,bobegir/folly,renyinew/folly,constantine001/folly,gaoyingie/folly,clearlinux/folly,romange/folly,Hincoin/folly,tempbottle/folly,hongliangzhao/folly,tomhughes/folly,stonegithubs/folly,loverszhaokai/folly,CJstar/folly,alexst07/folly,floxard/folly,SammyK/folly,yangjin-unique/folly,rklabs/folly,CJstar/folly,cole14/folly,bikong2/folly,sonnyhu/folly,CJstar/folly,Hincoin/folly,loversInJapan/folly,arg0/folly,floxard/folly,loversInJapan/folly,unmeshvrije/C--,facebook/folly,kernelim/folly,unmeshvrije/C--,bikong2/folly,SammyK/folly,project-zerus/folly,gavioto/folly,alexst07/folly,PoisonBOx/folly,raphaelamorim/folly,shaobz/folly,alexst07/folly,loverszhaokai/folly,unmeshvrije/C--,reddit/folly,PPC64/folly,cole14/folly,shaobz/folly,renyinew/folly,wildinto/folly,cppfool/folly,romange/folly,nickhen/folly,alexst07/folly,theiver9827/folly,cppfool/folly,yangjin-unique/folly,PoisonBOx/folly,gavioto/folly,brunomorishita/folly,reddit/folly,cole14/folly,PoisonBOx/folly,CJstar/folly,gaoyingie/folly,arg0/folly,rklabs/folly,floxard/folly,shaobz/folly,Orvid/folly,ykarlsbrun/folly,KSreeHarsha/folly,romange/folly,Eagle-X/folly,leolujuyi/folly,bsampath/folly,fw1121/folly,Hincoin/folly,bsampath/folly,Hincoin/folly,chjp2046/folly,tomhughes/folly,yangjin-unique/folly,guker/folly,Orvid/folly,bobegir/folly,loversInJapan/folly,KSreeHarsha/folly,Eagle-X/folly,xzmagic/folly,clearlylin/folly,loversInJapan/folly,colemancda/folly,fw1121/folly,xzmagic/folly,reddit/folly,constantine001/folly,arg0/folly,SeanRBurton/folly,CJstar/folly,bowlofstew/folly,clearlylin/folly,chjp2046/folly,sonnyhu/folly,hongliangzhao/folly,facebook/folly,leolujuyi/folly,KSreeHarsha/folly,lifei/folly,ykarlsbrun/folly,unmeshvrije/C--,sakishum/folly,clearlinux/folly,bobegir/folly,project-zerus/folly,unmeshvrije/C--,bsampath/folly,bikong2/folly,xzmagic/folly,wildinto/folly,gaoyingie/folly,SeanRBurton/folly,renyinew/folly,PPC64/folly,gavioto/folly,tomhughes/folly,zhiweicai/folly,guker/folly,clearlylin/folly,juniway/folly,lifei/folly,chjp2046/folly,arg0/folly,stonegithubs/folly,constantine001/folly,rklabs/folly,doctaweeks/folly,guker/folly,loversInJapan/folly,sonnyhu/folly,theiver9827/folly,tempbottle/folly,bowlofstew/folly,theiver9827/folly,loverszhaokai/folly