[vm] Ensure safepoint_state is updated atomically when unwinding.
[vm] Ensure safepoint_state is updated atomically when unwinding.

Fixes https://github.com/dart-lang/sdk/issues/48229
TEST=ci,flutter

Change-Id: Ifa88ef2415ba325e9ba6fb39d96b395ac5846026
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/230520
Reviewed-by: Ryan Macnak <d738b7f001baf9789095d7dc549cff6de60b011d@google.com>
Commit-Queue: Alexander Aprelev <dfb74c35a357c2059971a4bf7fe26b6a7c18085d@google.com>

dart-lang/sdk,dart-lang/sdk,dart-lang/sdk,dart-lang/sdk,dart-lang/sdk,dart-lang/sdk,dart-lang/sdk,dart-lang/sdk