stream-service: Restart accepting without blocking

Calling on_accept() sometimes lead to deadlocks when service->destroy()
was called concurrently.  That is, two threads waiting in on_accept() but
the last worker would only wake one due to the call to signal().  Calling
broadcast() wouldn't help either as that could lead to crashes if the thread
that called destroy() is waked first.

This also makes this more efficient as a constant pool of concurrent workers
can be maintained, otherwise peaks at the limit were followed by only a single
worker being active.
stream-service: Do not accept or re-register when service is terminated
stream-service: Prevent race conditions due to blocking call to destroy()

In the previous implementation queued jobs could prevent a service from
getting destroyed.  This could have lead to a deadlock when the
processor is cancelled.  No destroy() still blocks, but waits only for
actually running tasks.  The service instance is reference counted so that
queued jobs can safely abort execution.
unit-tests: Give worker threads time to clean up when testing detach()
TEST