Stopping the thread is done using pw_thread_loop_stop(), *which must be called without the lock held.* Fixes #10033