IVGCVSW-6873 Import inputs but don't export outputs fails.

Only one bool is used to indicate whether inputs should be imported.
However, its possible for the user to want to import inputs but not
export outputs. In addition it's possible for a user to enabled import
during optimize but then pass a memory source that does not require
import.

* Add m_ExportEnabled to INetwork.hpp.
* Modify Network::dNetwork to consider both m_ImportEnabled
  and m_ExportEnabled.
* Add ValidateSourcesMatchOptimizedNetwork to LoadedNetwork to validate
  import options between optimize and network load.
* Update the TfLite delegate consider exportEnabled flag in the
  optimizer.

!armnn-internal-tests:425350
Signed-off-by: Colm Donelan <colm.donelan@arm.com>
Change-Id: I776eab81595898e43f91ab40306962eae61329f4
diff --git a/delegate/src/armnn_delegate.cpp b/delegate/src/armnn_delegate.cpp
index bb2f3c3..1b6d68e 100644
--- a/delegate/src/armnn_delegate.cpp
+++ b/delegate/src/armnn_delegate.cpp
@@ -394,14 +394,20 @@
         // Load graph into runtime
         std::string errorMessage;
         armnn::Status loadingStatus;
-        armnn::MemorySource memorySource = armnn::MemorySource::Undefined;
+        armnn::MemorySource inputSource = armnn::MemorySource::Undefined;
+        armnn::MemorySource outputSource = armnn::MemorySource::Undefined;
+        // There's a bit of an assumption here that the delegate will only support Malloc memory source.
         if (delegate->m_Options.GetOptimizerOptions().m_ImportEnabled)
         {
-            memorySource = armnn::MemorySource::Malloc;
+            inputSource = armnn::MemorySource::Malloc;
+        }
+        if (delegate->m_Options.GetOptimizerOptions().m_ExportEnabled)
+        {
+            outputSource = armnn::MemorySource::Malloc;
         }
         armnn::INetworkProperties networkProperties(false,
-                                                    memorySource,
-                                                    memorySource,
+                                                    inputSource,
+                                                    outputSource,
                                                     delegate->m_Options.GetInternalProfilingState(),
                                                     delegate->m_Options.GetInternalProfilingDetail());
         loadingStatus = delegate->m_Runtime->LoadNetwork(networkId,