thrift/fastproto.pyx nested structs
thrift/fastproto.pyx nested structs

Summary:
So turns out that thrift_spec uses lists for the type_args of structs
instead of tuples like the other types.

So on encode and decode turn it into a tuple so we can use it.

Also to_cstr turned a python str/bytes into a char*, but the function took a
string.  And the len(unicode) != len(unicode.encode())
So I just turn the python type directly into string and I am no longer seeing
garbled ending on long T_STRING fields.

Test Plan: Was encoding and decoding different structs

Reviewed By: haijunz@fb.com

Subscribers: ruibalp, alandau, bmatheny, mshneer

FB internal diff: D1651506

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