Enabling folly::Synchronized for non-default constructible objects
Enabling folly::Synchronized for non-default constructible objects

Summary:
Currently folly::Synchronized can't be used with non-default
constructible types because copy and move constructors require
creation of datum_ before it's assignment.
To fix this we can initialize them in initializer-list and
handle guard creation using helper constructor

Test Plan:
fbconfig -r folly && fbmake runtests
Fixes compilation error: Synchronized started working for non-default
constructible types in my project(rfe).

Reviewed By: yuri@fb.com

Subscribers: dhruvbird

FB internal diff: D1502110

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