The lifetime of ltt_session objects is mishandled in a number
of situations. For instance, if a rotation is launched on a
session and the session is destroyed during the rotation, it
is not possible for the session daemon to identify the completion
of the rotation. This then prevents the session daemon from
renaming the last chunk of a now-destroyed session and from
notifying clients that a new trace archive chunk is available.
This change only introduces reference counting of the ltt_session
objects; it does not change any behavior with regards to the
lifetime of the sessions themselved. Follow-up commits introduce
those changes.
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>