IVGCVSW-6062 Rework the async threadpool

!android-nn-driver:5802

* Extract the threadpool from LoadedNetwork/Runtime
* Refactor the threadpool to be handle multiple networks
* Trim IAsyncExecutionCallback and add an InferenceId to AsyncExecutionCallback
* Add AsyncCallbackManager class

Signed-off-by: Finn Williams <Finn.Williams@arm.com>
Change-Id: I36aa2ad29c16bc10ee0706adfeb6b27f60012afb
diff --git a/src/armnn/Runtime.cpp b/src/armnn/Runtime.cpp
index 374064e..f16d186 100644
--- a/src/armnn/Runtime.cpp
+++ b/src/armnn/Runtime.cpp
@@ -89,15 +89,6 @@
     return pRuntimeImpl->Execute(workingMemHandle, inputTensors, outputTensors);
 }
 
-void IRuntime::Schedule(NetworkId networkId,
-                        const InputTensors& inputTensors,
-                        const OutputTensors& outputTensors,
-                        const QosExecPriority priority,
-                        std::shared_ptr<IAsyncExecutionCallback> cb)
-{
-    pRuntimeImpl->Schedule(networkId, inputTensors, outputTensors, priority, cb);
-}
-
 Status IRuntime::UnloadNetwork(NetworkId networkId)
 {
     return pRuntimeImpl->UnloadNetwork(networkId);
@@ -160,8 +151,7 @@
         std::unique_ptr<IOptimizedNetwork>(rawNetwork),
         errorMessage,
         networkProperties,
-        m_ProfilingService,
-        networkIdOut);
+        m_ProfilingService);
 
     if (!loadedNetwork)
     {
@@ -460,34 +450,6 @@
     return loadedNetwork->Execute(inputTensors, outputTensors, iWorkingMemHandle);
 }
 
-void RuntimeImpl::Schedule(NetworkId networkId,
-                           const InputTensors& inputTensors,
-                           const OutputTensors& outputTensors,
-                           const QosExecPriority priority,
-                           std::shared_ptr<IAsyncExecutionCallback> callback)
-{
-    LoadedNetwork* loadedNetwork = GetLoadedNetworkPtr(networkId);
-
-    if (!loadedNetwork)
-    {
-        throw armnn::Exception(
-            "Network with ID of " + std::to_string(networkId) + " does not exist \n"
-            );
-    }
-    if (!loadedNetwork->IsAsyncEnabled())
-    {
-        throw armnn::Exception(
-            "Attempting to schedule Network " + std::to_string(networkId) + " when it is not async enabled \n"
-            );
-    }
-
-    ProfilerManager::GetInstance().RegisterProfiler(loadedNetwork->GetProfiler().get());
-
-    ARMNN_SCOPED_PROFILING_EVENT(Compute::Undefined, "Schedule");
-
-    loadedNetwork->Schedule(inputTensors, outputTensors, priority, callback);
-}
-
 /// Create a new unique WorkingMemHandle object. Create multiple handles if you wish to have
 /// overlapped Execution by calling this function from different threads.
 std::unique_ptr<IWorkingMemHandle> RuntimeImpl::CreateWorkingMemHandle(NetworkId networkId)