MINOR: stream: detach the stream from its own task on stream_free()

This makes sure that the stream is not visible from its own task just
before starting to free some of its components. This way we have the
guarantee that a stream found in a task list is totally valid and can
safely be dereferenced.
1 file changed