clients: simple-im: handle proper destruction of objects
Add signal handler for SIGINT to enable graceful exit and release allocated memory.
This resolves the memory leak observed with Valgrind:
LEAK SUMMARY:
definitely lost: 2,520 bytes in 2 blocks
indirectly lost: 16,820 bytes in 11 blocks
possibly lost: 0 bytes in 0 blocks
still reachable: 0 bytes in 0 blocks
suppressed: 0 bytes in 0 blocks
Fixes: #872 (closed)
Signed-off-by: Chirag Khurana quic_ckhurana@quicinc.com