base: Re-arm @sync teardown waits across severity escalations
A cancelled `@sync` awaits its children in sync_cancel!, parking each
teardown wait with min_severity one above the acknowledged request so only
an escalation can interrupt it. That interruption unwound straight out of
the `@sync`, so a SAFE request escalated to ABANDON_EXTERNAL released the
block while internal compute-bound children were still running,
contradicting the documented contract that ABANDON_EXTERNAL keeps awaiting
internal tasks.
Adopt the escalated request instead: re-enter the teardown wait under the
new severity's policy, and report the strongest request when the teardown
completes. ABANDON_ALL still ceases waiting (the children are frozen).
Reported in JuliaLang/julia#60281 (comment):
https://github.com/JuliaLang/julia/pull/60281#discussion_r3582068136
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TPMqtAGKwxaitJWknYkRcX