QtROIoDeviceBasePrivate: fix memleak of the codec object


As reported by ASAN, there is a memory leak for the
QtROIoDeviceBasePrivate::m_codec object. It seems that the codec was
created in QRemoteObjectNodePrivate::onClientRead(), but never deleted.
Fix it by wrapping the codec into std::unique_ptr.

Pick-to: 6.6 6.5 6.2
Change-Id: I49bc9a8031e657cac064551b51bb0b8082865887
Reviewed-by: Brett Stottlemyer <bstottle@ford.com>
Reviewed-by: Øystein Heskestad <oystein.heskestad@qt.io>
commit102f1449a9891b0d79b6f9754ab70fa37aea117a
parent9c3c20b501f8eb1e2c03e4b2934fd48a92506489
authorIvan Solovev <ivan.solovev@qt.io>
committerIvan Solovev <ivan.solovev@qt.io>
commit timeMon, 18 Sep 2023 19:16:51 +0200