VOL-3419: Replicate voltha flows in openolt agent
- Use the flow_id, symmetric_flow_id, replication_flag and pbit_to_gemport_map
  coming in Flow proto messge to replicate the flow as needed
- Use the CreateQueues and RemoveQueues messages to setup and remove gem_ports
- Use latest gRPC version 1.31.1 which allows fine tuning of gRPC threadpools
  which allows for greating performance.
- Performance numbers when tested with openolt-scale-tester has been better with
  using latest gRPC and threadpool tuning when compared to earlier. It is to be
  noted that the performance is better even with openolt-agent replicating the flow
  now.
- Scale tests with 512 subscribers have been successfull with BAL3.4.7.5 version
- Use openolt proto version 4.0.0
- Use openolt-test (for unit test) image version 2.0.1 (which bundles latest gRPC version 1.31.1)
- These changes are NOT backward compatible and openolt-agent will have a major
  version bump to 3.0.0

Change-Id: I715c804bdf342e60d08cab6c59e1c21b8c5ac1f4
diff --git a/agent/common/server.cc b/agent/common/server.cc
index 72fc2f7..0294a34 100644
--- a/agent/common/server.cc
+++ b/agent/common/server.cc
@@ -34,6 +34,7 @@
 
 using grpc::Server;
 using grpc::ServerBuilder;
+using grpc::ResourceQuota;
 using grpc::ServerContext;
 using grpc::ServerWriter;
 using grpc::Status;
@@ -127,31 +128,15 @@
             ServerContext* context,
             const openolt::Flow* request,
             openolt::Empty* response) override {
-        return FlowAdd_(
-            request->access_intf_id(),
-            request->onu_id(),
-            request->uni_id(),
-            request->port_no(),
-            request->flow_id(),
-            request->flow_type(),
-            request->alloc_id(),
-            request->network_intf_id(),
-            request->gemport_id(),
-            request->classifier(),
-            request->action(),
-            request->priority(),
-            request->cookie(),
-            request->group_id(),
-            request->tech_profile_id());
+        return FlowAddWrapper_(request);
+
     }
 
     Status FlowRemove(
             ServerContext* context,
             const openolt::Flow* request,
             openolt::Empty* response) override {
-        return FlowRemove_(
-            request->flow_id(),
-            request->flow_type());
+        return FlowRemoveWrapper_(request);
     }
 
     Status EnableIndication(
@@ -356,8 +341,10 @@
     serverPort = ipAddress.append(":9191").c_str();
     OpenoltService service;
     std::string server_address(serverPort);
-    ServerBuilder builder;
-
+    ::ServerBuilder builder;
+    ::ResourceQuota quota;
+    quota.SetMaxThreads(GRPC_THREAD_POOL_SIZE);
+    builder.SetResourceQuota(quota);
     builder.AddListeningPort(server_address, grpc::InsecureServerCredentials());
     builder.RegisterService(&service);