When we directly call `exit()` from `sig_handle_blender_esc`, the
program will try to free up all static variables and terminate all
threads (and do some file handle cleanup).
The destuctor of the static sound `GlobalState` will hang if
`delayed_close_cv` is in use by other threads as it will wait for them
to let go of it before the destructor finishes.
To make sure that it can finish, the destructor now notifies all
potential threads that they should exit.
Pull Request: https://projects.blender.org/blender/blender/pulls/146665