THRIFT-922. cpp: Templatize binary and compact protocol

Convert TBinaryProtocol and TCompactProtocol to template classes, taking
the transport class as a template parameter.  This allows them to make
non-virtual calls when using the template, improving serialization
performance.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@1005136 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/lib/cpp/src/protocol/TJSONProtocol.h b/lib/cpp/src/protocol/TJSONProtocol.h
index cd42f5e..b3a6667 100644
--- a/lib/cpp/src/protocol/TJSONProtocol.h
+++ b/lib/cpp/src/protocol/TJSONProtocol.h
@@ -291,6 +291,7 @@
   };
 
  private:
+  TTransport* trans_;
 
   std::stack<boost::shared_ptr<TJSONContext> > contexts_;
   boost::shared_ptr<TJSONContext> context_;