core: use an unsigned type for stream ids