[roll third_party/pigweed] pw_thread_freertos: use scheduler state for util & snapshot

Updates the snapshot thread iterator to check the scheduler state
as a precondition for thread iteration.

In addition FreeRTOS & embOS snapshot support was updated to
gracefully support snapshotting before the scheduler has started.

Original-Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/54580

third_party/pigweed Rolled-Commits: c593e05c4220161..b40a6b6f7ac1113
Roller-URL: https://ci.chromium.org/b/8840607879794716544
Cq-Cl-Tag: roller-builder:pigweed-experimental-roller
Cq-Cl-Tag: roller-bid:8840607879794716544
CQ-Do-Not-Cancel-Tryjobs: true
Change-Id: Ic17c2048df766e2000bab752f3846071a6f0e589
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/experimental/+/54760
Reviewed-by: Pigweed Integration Roller <pigweed-integration-roller@pigweed.google.com.iam.gserviceaccount.com>
Commit-Queue: Pigweed Integration Roller <pigweed-integration-roller@pigweed.google.com.iam.gserviceaccount.com>
diff --git a/third_party/pigweed b/third_party/pigweed
index c593e05..b40a6b6 160000
--- a/third_party/pigweed
+++ b/third_party/pigweed
@@ -1 +1 @@
-Subproject commit c593e05c4220161fc674ae331472fa240f0771be
+Subproject commit b40a6b6f7ac1113d5651dffcfa5b3f86857d00ab