Improve enums in Hack generator
Improve enums in Hack generator

Summary:
This makes enums nullable by default, so that unset enums are null. This removes the hacky __unset enum and prepares for the generation of first class enums.

This also changes the behavior when the hack deserializer encounters an unknown value for an enum. Where it would throw before, it now sets the value to null.

Test Plan: Regenerated thrift files in our codebase, inspected the generated code and hack errors.

Reviewed By: mcduff@fb.com

Subscribers: mshneer, trunkagent, alandau

FB internal diff: D1590304

Signature: t1:1590304:1415222187:2dd2c056fa6aac11d2d5130881ba42eb88fdb4f5

fengshao0907/fbthrift,chjp2046/fbthrift,facebook/fbthrift,SergeyMakarenko/fbthrift,chjp2046/fbthrift,maxwell-demon/fbthrift,jesboat/fbthrift,SergeyMakarenko/fbthrift,maxwell-demon/fbthrift,guker/fbthrift,facebook/fbthrift,facebook/fbthrift,project-zerus/fbthrift,Orvid/fbthrift,sinjar666/fbthrift,chjp2046/fbthrift,uber/fbthrift,jesboat/fbthrift,soumith/fbthrift,guker/fbthrift,SergeyMakarenko/fbthrift,soumith/fbthrift,SergeyMakarenko/fbthrift,fengshao0907/fbthrift,LinusU/fbthrift,HankFaan/fbthrift,soumith/fbthrift,LinusU/fbthrift,sinjar666/fbthrift,fengshao0907/fbthrift,Orvid/fbthrift,LinusU/fbthrift,raphaelamorim/fbthrift,kangkot/fbthrift,sinjar666/fbthrift,SergeyMakarenko/fbthrift,raphaelamorim/fbthrift,HankFaan/fbthrift,kangkot/fbthrift,uber/fbthrift,kangkot/fbthrift,raphaelamorim/fbthrift,soumith/fbthrift,kangkot/fbthrift,kangkot/fbthrift,SergeyMakarenko/fbthrift,project-zerus/fbthrift,project-zerus/fbthrift,fengshao0907/fbthrift,guker/fbthrift,chjp2046/fbthrift,raphaelamorim/fbthrift,guker/fbthrift,getyourguide/fbthrift,sinjar666/fbthrift,getyourguide/fbthrift,facebook/fbthrift,HankFaan/fbthrift,LinusU/fbthrift,guker/fbthrift,kangkot/fbthrift,LinusU/fbthrift,uber/fbthrift,HankFaan/fbthrift,raphaelamorim/fbthrift,chjp2046/fbthrift,fengshao0907/fbthrift,jesboat/fbthrift,soumith/fbthrift,maxwell-demon/fbthrift,guker/fbthrift,Orvid/fbthrift,chjp2046/fbthrift,sinjar666/fbthrift,chjp2046/fbthrift,maxwell-demon/fbthrift,uber/fbthrift,getyourguide/fbthrift,fengshao0907/fbthrift,project-zerus/fbthrift,maxwell-demon/fbthrift,project-zerus/fbthrift,fengshao0907/fbthrift,jesboat/fbthrift,facebook/fbthrift,facebook/fbthrift,raphaelamorim/fbthrift,getyourguide/fbthrift,maxwell-demon/fbthrift,maxwell-demon/fbthrift,SergeyMakarenko/fbthrift,project-zerus/fbthrift,HankFaan/fbthrift,LinusU/fbthrift,HankFaan/fbthrift,facebook/fbthrift,facebook/fbthrift,uber/fbthrift,HankFaan/fbthrift,HankFaan/fbthrift,LinusU/fbthrift,getyourguide/fbthrift,jesboat/fbthrift,chjp2046/fbthrift,soumith/fbthrift,kangkot/fbthrift,LinusU/fbthrift,kangkot/fbthrift,LinusU/fbthrift,jesboat/fbthrift,LinusU/fbthrift,jesboat/fbthrift,SergeyMakarenko/fbthrift,getyourguide/fbthrift,raphaelamorim/fbthrift,sinjar666/fbthrift,maxwell-demon/fbthrift,jesboat/fbthrift,uber/fbthrift,Orvid/fbthrift,facebook/fbthrift,SergeyMakarenko/fbthrift,uber/fbthrift,uber/fbthrift,uber/fbthrift,sinjar666/fbthrift,jesboat/fbthrift,HankFaan/fbthrift,kangkot/fbthrift,sinjar666/fbthrift,LinusU/fbthrift,maxwell-demon/fbthrift,sinjar666/fbthrift,maxwell-demon/fbthrift,fengshao0907/fbthrift,raphaelamorim/fbthrift,getyourguide/fbthrift,getyourguide/fbthrift,sinjar666/fbthrift,Orvid/fbthrift,chjp2046/fbthrift,raphaelamorim/fbthrift,project-zerus/fbthrift,soumith/fbthrift,raphaelamorim/fbthrift,guker/fbthrift,SergeyMakarenko/fbthrift,raphaelamorim/fbthrift,project-zerus/fbthrift,getyourguide/fbthrift,guker/fbthrift,getyourguide/fbthrift,getyourguide/fbthrift,jesboat/fbthrift,guker/fbthrift,maxwell-demon/fbthrift,Orvid/fbthrift,project-zerus/fbthrift,guker/fbthrift,fengshao0907/fbthrift,SergeyMakarenko/fbthrift,uber/fbthrift,HankFaan/fbthrift,fengshao0907/fbthrift,HankFaan/fbthrift,project-zerus/fbthrift,chjp2046/fbthrift,soumith/fbthrift,Orvid/fbthrift,project-zerus/fbthrift,fengshao0907/fbthrift,jesboat/fbthrift,chjp2046/fbthrift,Orvid/fbthrift,kangkot/fbthrift,Orvid/fbthrift,jesboat/fbthrift,Orvid/fbthrift,chjp2046/fbthrift,SergeyMakarenko/fbthrift,Orvid/fbthrift,sinjar666/fbthrift,getyourguide/fbthrift,guker/fbthrift,soumith/fbthrift,soumith/fbthrift,project-zerus/fbthrift,kangkot/fbthrift,uber/fbthrift,soumith/fbthrift,uber/fbthrift