Fix: possible double-close on stream out_fd

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
Fix: send kernel stream to relayd only if needed

Signed-off-by: David Goulet <dgoulet@efficios.com>
Fix: destroy metadata stream on setup metadata error path

Signed-off-by: David Goulet <dgoulet@efficios.com>
Fix: add globally visible flag in stream

This flag is added so we can destroy it correctly with the
consumer-stream API.

Signed-off-by: David Goulet <dgoulet@efficios.com>
Fix: bad pathname used when sending kernel stream to relayd

Signed-off-by: David Goulet <dgoulet@efficios.com>
Fix: don't send error to sessiond on orderly shutdown

The send always fail if the sessiond has closed the socket so no point
of trying to send an error.

Signed-off-by: David Goulet <dgoulet@efficios.com>
Fix: relayd refcount updates for stream

Increment refcount only when the stream was successfully sent to the
relayd and set the new stream's flag "sent_to_relayd" which is used
before the refcount update when closing the relayd. A stream that was
unable to be sent, the close relayd code path does not decrement the
refcount anymore.

Signed-off-by: David Goulet <dgoulet@efficios.com>