MINOR: stream: Add stream_generate_unique_id function

Currently unique IDs for a stream are generated using repetitive code in
multiple locations, possibly allowing for inconsistent behavior.
3 files changed