THRIFT-2471

three changes as discussed in THRIFT-2471:

* Update parser to use & instead of cpp.ref
* Recursion depth limit, a la protobufs
* shared_ptr instead of raw pointer w/deletes in the destructor.