THRIFT-2013: add multiplex server and client test support to cpp language
add multiplex client test support to csharp and java languages
fix a bug in the server-side header protocol factory
fix a bug in the cpp SSL server socket implementation
remove unnecessary sleep in cpp server testOneway

This closes #1414
diff --git a/test/tests.json b/test/tests.json
index c1c3155..bde9014 100644
--- a/test/tests.json
+++ b/test/tests.json
@@ -11,9 +11,7 @@
       ],
       "protocols": [
         "binary:multi",
-        "compact:multic",
-        "multi",
-        "multic"
+        "compact:multic"
       ]
     },
     "client": {
@@ -22,8 +20,6 @@
         "--lt-debug"
       ],
       "protocols": [
-        "multi",
-        "multic",
         "multi:binary",
         "multic:compact"
       ],
@@ -40,7 +36,9 @@
     ],
     "protocols": [
       "binary",
-      "compact"
+      "compact",
+      "multi",
+      "multic"
     ],
     "workdir": "c_glib"
   },
@@ -124,10 +122,7 @@
       "protocols": [
         "binary:multi",
         "compact:multic",
-        "json:multij",
-        "multi",
-        "multic",
-        "multij"
+        "json:multij"
       ]
     },
     "client": {
@@ -135,6 +130,11 @@
       "extra_args": ["run-testclient"],
       "transports": [
         "http"
+      ],
+      "protocols": [
+        "multi:binary",
+        "multic:compact",
+        "multij:json"
       ]
     },
     "transports": [
@@ -149,7 +149,10 @@
     "protocols": [
       "binary",
       "compact",
-      "json"
+      "json",
+      "multi",
+      "multic",
+      "multij"
     ],
     "workdir": "../lib/java"
   },
@@ -298,12 +301,24 @@
     "server": {
       "command": [
         "TestServer"
+      ],
+      "protocols": [
+        "binary:multi",
+        "compact:multic",
+        "header:multih",
+        "json:multij"
       ]
     },
     "client": {
       "timeout": 8,
       "command": [
         "TestClient"
+      ],
+      "protocols": [
+        "multi:binary",
+        "multic:compact",
+        "multih:header",
+        "multij:json"
       ]
     },
     "transports": [
@@ -320,7 +335,11 @@
       "compact",
       "binary",
       "json",
-      "header"
+      "header",
+      "multi",
+      "multic",
+      "multih",
+      "multij"
     ],
     "workdir": "cpp"
   },
@@ -385,6 +404,12 @@
         "mono",
         "TestClientServer.exe",
         "client"
+      ],
+      "protocols": [
+        "multi",
+        "multic",
+        "multi:binary",
+        "multic:compact"
       ]
     },
     "workdir": "csharp"
@@ -408,9 +433,9 @@
       "command": [
         "dotnet",
         "run",
-	"--no-build",
-	"--no-restore",
-	"--",
+  "--no-build",
+  "--no-restore",
+  "--",
         "server"
       ]
     },
@@ -419,9 +444,9 @@
       "command": [
         "dotnet",
         "run",
-	"--no-build",
-	"--no-restore",
-	"--",
+  "--no-build",
+  "--no-restore",
+  "--",
         "client"
       ]
     },
@@ -622,12 +647,20 @@
     "server": {
       "command": [
         "test_server"
+      ],
+      "protocols": [
+        "binary:multi",
+        "compact:multic"
       ]
     },
     "client": {
       "timeout": 6,
       "command": [
         "test_client"
+      ],
+      "protocols": [
+        "multi:binary",
+        "multic:compact"
       ]
     },
     "sockets": [