Protect the shutdown of selector threads with a mutex.
Protect the shutdown of selector threads with a mutex.

Former-commit-id: 80a3188454646b210f6486cc40c4814f4fc6a557
jolie/jolie,jolie/jolie,jolie/jolie