Thrift: Move TStringBuffer functionality into TMemoryBuffer.

Summary:
TMemoryBuffer already has the necessary plubming to work with C++ strings.
This revision implements that functionality with a few wrapper methods.
Removed TStringBuffer as it should no longer be required (and it is tricky
to safely inherit from a class that has a non-virtual destructor).
Also refactored the TMemoryBuffer constructors a bit.

Reviewed By: aditya, yunfang

Test Plan:
test/TMemoryBufferTest.cpp

Revert Plan: ok


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665213 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/test/OptionalRequiredTest.thrift b/test/OptionalRequiredTest.thrift
index 9738bd6..b2652dd 100644
--- a/test/OptionalRequiredTest.thrift
+++ b/test/OptionalRequiredTest.thrift
@@ -1,6 +1,6 @@
 /*
 ../compiler/cpp/thrift -cpp OptionalRequiredTest.thrift
-g++ -Wall -I../lib/cpp/src -I/usr/local/include/boost-1_33_1 \
+g++ -Wall -g -I../lib/cpp/src -I/usr/local/include/boost-1_33_1 \
   OptionalRequiredTest.cpp gen-cpp/OptionalRequiredTest_types.cpp \
   ../lib/cpp/.libs/libthrift.a -o OptionalRequiredTest
 ./OptionalRequiredTest