[sdb] Fix more crashes on shutdown when the assembly unload callbacks are called on the debugger thread. Fixes #25009.