[vm] Fix some data races with profiler samples.
[vm] Fix some data races with profiler samples.

- Sample collection must acquire or there is a write-write data race with sample processing/clearing.
- Sample processing must release or there is a write-write data race with another sample processing.

Bug: https://github.com/dart-lang/sdk/issues/41242
Change-Id: I57c1f813fc8b38d31e12dd8d7d3b19d96a9c8912
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141466
Reviewed-by: Alexander Markov <239e774fd29abc1267878f57afe1a8a03e0ca887@google.com>
Commit-Queue: Ryan Macnak <d738b7f001baf9789095d7dc549cff6de60b011d@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