Fix root predicates (#98942)
Fix the definition of GC roots to account for all transient references
There was a categorical mistake in how `uppers` and
`collectible_dependents` were interpreted. Both of these refer to a task
above us and this is it is a reference but the reference might be
comming from transient or persistent tasks. This is what kept confusing
the 'root' definition
So the new definition is simply
* You are collectible if there are no references (persistent or
transient)
* You are a root if there are only transient references, which includes
transient uppers and collectible_dependents
The old definition expected roots to have no uppers at all, which isn't
correct. A `run_once` task becomes an aggregation root and so the nested
persistent tasks reference it as an upper. Those tasks should become gc
roots since they are on the transient <--> persistent boundary and the
only thing retaining them is references from transient tasks.