Import Thrift libs and a slightly adapted serialization_benchmark.

Based on Thrift revision bf2617ed15.