IVGCVSW-3937 Improve the Connection Acknowledged Handler

 * The Connection Acknowledged Handler should report an error
   is it's called while in a wrong state
 * Stopping the threads in the ProfilingService before having
   to start them again
 * Updated the unit tests to check the changes
 * Removed unnecessary Packet.cpp file
 * Fixed memory leak

Signed-off-by: Matteo Martincigh <matteo.martincigh@arm.com>
Change-Id: I8c4d33b4d97994df86fe6c9f8c659f880ec64c16
diff --git a/src/profiling/ProfilingService.hpp b/src/profiling/ProfilingService.hpp
index 50a938e..edeb6bd 100644
--- a/src/profiling/ProfilingService.hpp
+++ b/src/profiling/ProfilingService.hpp
@@ -109,7 +109,7 @@
     }
     ~ProfilingService() = default;
 
-    // Protected method for testing
+    // Protected methods for testing
     void SwapProfilingConnectionFactory(ProfilingService& instance,
                                         IProfilingConnectionFactory* other,
                                         IProfilingConnectionFactory*& backup)
@@ -120,6 +120,10 @@
         backup = instance.m_ProfilingConnectionFactory.release();
         instance.m_ProfilingConnectionFactory.reset(other);
     }
+    IProfilingConnection* GetProfilingConnection(ProfilingService& instance)
+    {
+        return instance.m_ProfilingConnection.get();
+    }
 };
 
 } // namespace profiling