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/SendCounterPacket.cpp b/src/profiling/SendCounterPacket.cpp
index b9f2b18..e48da3e 100644
--- a/src/profiling/SendCounterPacket.cpp
+++ b/src/profiling/SendCounterPacket.cpp
@@ -945,7 +945,7 @@
     // Exception handling lock scope - Begin
     {
         // Lock the mutex to handle any exception coming from the send thread
-        std::unique_lock<std::mutex> lock(m_WaitMutex);
+        std::lock_guard<std::mutex> lock(m_WaitMutex);
 
         // Check if there's an exception to rethrow
         if (m_SendThreadException)