qi.type: Fixes a race between future destruction and cancellation.
qi.type: Fixes a race between future destruction and cancellation.

Fixes #44862, #44841, #44025.

This patch fixes a race condition between the cancellation of a future
and its destruction. It could happen when the cancel request was
processed at the same time as the value was set. The conversion steps of
the value would result in the destruction of the result of an initial
`metacall` which could be accessed at the same time by a `cancel` call.

This patch binds the call to the cancel to a `shared_ptr` of the value,
resulting in a delay of its destruction until after the cancel.

Change-Id: I99e2f5cf13d1f3cf446ffe4e69e78d71f3c90e2a
Reviewed-on: http://gerrit.aldebaran.lan/96445
Reviewed-by: vincent.palancher <f8ff75e1c61314c499fafa8de0d9e004e87e66b0@softbankrobotics.com>
Reviewed-by: jlamotte <70353e7b0c7d18b7fc75605daf0ccba69fcd3222@aldebaran.com>
Reviewed-by: philippe.martin <a3db8b74c3cf86a5cf091dca4e2125b498be933d@softbankrobotics.com>
Tested-by: vincent.palancher <f8ff75e1c61314c499fafa8de0d9e004e87e66b0@softbankrobotics.com>

aldebaran/libqi,aldebaran/libqi,aldebaran/libqi