THRIFT-4776:Modernize c++11 code by clang-tidy (#1732)

* use override
* use make_shared
* use emplace
* use range for
* fix error on MSVC
* replace boost functions with std functions
* fix static analyzer warnings
* check api return value
* initialize member
* check the return value of SSL_peek > 0
* add override
diff --git a/lib/cpp/test/TMemoryBufferTest.cpp b/lib/cpp/test/TMemoryBufferTest.cpp
index 9206872..42f9711 100644
--- a/lib/cpp/test/TMemoryBufferTest.cpp
+++ b/lib/cpp/test/TMemoryBufferTest.cpp
@@ -81,9 +81,9 @@
 }
 
 BOOST_AUTO_TEST_CASE(test_readAppendToString) {
-  string* str1 = new string("abcd1234");
-  TMemoryBuffer buf((uint8_t*)str1->data(),
-                    static_cast<uint32_t>(str1->length()),
+  string str1 = "abcd1234";
+  TMemoryBuffer buf((uint8_t*)str1.data(),
+                    static_cast<uint32_t>(str1.length()),
                     TMemoryBuffer::COPY);
 
   string str3 = "wxyz", str4 = "6789";