Fix deadlock between {stop,join}Clients and clientFinished.

The bug triggers e.g. when stopClients() / joinClients() is
called while a handle is running.

CR-1297 #resolve