Add BoundedResource
JobControl: Use Chan-based BoundedResource instead of Semaphore.

This removes the dependency on stm.
Remove unused Distribution.Compat.Semaphore