[utils] Add foreach variant that supports filtering the list as you go.
[runtime] Introduce the notion of a tools thread.

A tools thread is one that can access core runtime structures but not touch anything managed (code or heap).

It's intended to enable the profiler to resolve missing backtraces from its helper thread.

THIS IS A HACK.

The right solution would be to not perform this on the profiler at all and simply log IPs and let the decoder
resolve them. But then there's reality and we can't simply break the current format without consequences.

We're taking this hack for now until we can fix the profiler to do something sensible.
[jit] Don't sample threads that are not fully attached.
[profiler] Use the new hidden API to attach the helper thread as a tools thread. This makes JI lookup work more reliably.