Avoid a race where cpu_switch loads a stale context.
cpu_switch stores the old context state, unlocks the old thread's
td_lock, waits for the new td_lock to be != &blocked_lock, then
loads the new context.
Without barriers the td_lock store could become visible before the
context stores, and the context loads could be reordered before the
td_lock load.
Add a release fence before the store and an acquire fence after the
spinloop, as done by stlr/ldar on arm64.
PR: 300855