use channel instead of mutex for generating ids
remove overly-defensive state transition mutex
use channels for interacting with job's streams