unix: add assert when the stream is destroyed

Ensures if the write_queue_size is really 0.