Build thrift2 compiler with buck
Build thrift2 compiler with buck

Summary:
This makes a few tweaks to the thrift2 build to get it working with
buck:
- Add a lookup entry for locating the thrift2 binary as built by buck.
- Use argv0 to base the lookup, instead of env["_"] which isn't set
when not invoked via the shell.
- Rename "thrift/compile/py:thrift-py" to drop the "-py" suffix as this
is basically convention for indicating a thrift_library rule (and which
buckification relies on).
- Make thrift2 a dep of thrift, since we need the former to run the
latter.

Test Plan:
- built thrift/thrift2 with buck
- built biggrep with fbconfig

Reviewed By: davejwatson@fb.com

Subscribers: trunkagent, simpkins, ruibalp, agallagher, sdwilsh, alandau, mshneer

FB internal diff: D1814407

Tasks: 5235246

Signature: t1:1814407:1422900525:9e93ad1dd57dfccc9b3a4b93262074ecd67051c1

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