BaseApi: fix memleak when using QSlotObjectBase
The CallerInfo struct was storing a raw pointer that is allocated on
the heap (in QtPrivate::makeCallableObject()).
As a result, we were always leaking these objects.
Similarly to other places that use QSlotObjectBase, update the struct
to hold SlotObjSharedPtr instead.
As a drive-by: wrap the contextObject into QPointer, because it can
go out of scope by the time we try to use it.
Task-number: QTBUG-142907
Pick-to: 6.11
Change-Id: I1374a1b95fb6d07cb9016bafbe4c5bc025d1f898
Reviewed-by: Tatiana Borisova <tatiana.borisova@qt.io>