Fixed stream ack problem as reported by bjcollins.
Moved thread and event init to stream_start and cleanup to stream_stop.