Throttle for streaming queries.

Also includes changes to semaphore to support timeouts.
Throttle for streaming queries.

Also includes changes to semaphore to support timeouts.
Merge branch 'stream-throttle'