scheduler: Fix scheduler retention cycle (#57789)

async_tasks can build a cycle with the scheduler where the runnable
itself keeps a reference to the scheduler and the scheduler keeping
references to the runnable. This effectively can cause scheduler / task
leaks, most notably in test environments, so we break this cycle by
using weak pointers instead.

Release Notes:

- N/A or Added/Fixed/Improved ...
f839f8e108Lukas Wirth committed on 5/27/2026, 10:32:14 AM· committed by GitHubparent6555ac3
2 files changedLine totals unavailable