feature_flags: Add `FeatureFlagAppExt::wait_for_flag_or_timeout` (#24055)

This PR adds a new `wait_for_flag_or_timeout` method to the
`FeatureFlagAppExt` trait.

This encapsulates the somewhat gnarly code for using `wait_for_flag`
with a timeout.

A side benefit of this is that the tasks waiting on the feature flags
run in parallel, so in the case where the feature flags do not resolve
we don't end up having to wait on consecutive timeouts. This should help
a bit with https://github.com/zed-industries/zed/issues/23922.

Release Notes:

- N/A
4d9659adc4Marshall Bowers committed on 1/31/2025, 10:35:23 PM· committed by GitHubparent3af37dd
4 files changedLine totals unavailable