MPMCQueue.h: fix a bug introduced while accommodating -Wsign-compare
MPMCQueue.h: fix a bug introduced while accommodating -Wsign-compare

Summary:
* folly/MPMCQueue.h (waitForTurn): My changes to accommodate
-Wsign-compare introduced a bug that could cause lots of wasted CPU.
(See @scottf's comments on the blamed patch.)
Subtraction involving an unsigned type will always yield an unsigned
result, and there was at least this one instance where the result
would sometimes have to be a small negative number.  Instead, we'd
get approximately UINT32_MAX.  The fix is to explicitly cast the
difference to a signed type.

Test Plan:
Run this and note there is no error:
(this ensures it remains -Wsign-compare-clean with gcc-4.9)

fbconfig --platform-all=gcc-4.9-glibc-2.20 tao/server && fbmake dbgo

Before this change, running the mpmc_queue_test test would get
timeout errors ~8 in 100 runs.  Confirm that with this patch, now
there is no type of failure. I.e., run these commands and ensure
the grep prints nothing:

fbconfig folly/test:mpmc_queue_test
for i in $(seq 100); do fbmake runtests_dbgo >& makerr-$i; done
grep -E '(TIMEOUT|FATAL|FAIL).* [1-9]' makerr-*

Reviewed By: hans@fb.com

Subscribers: trunkagent, scottf, folly-diffs@

FB internal diff: D1783672

Tasks: 5941250

Signature: t1:1783672:1421350260:d7d306e8cf3ed3ee636d06228e1f24a2c2796b54

Blame Revision: D1766722

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