Scoped values (#50958)
ScopedVariables are containers whose observed value depends the current
dynamic scope. This implementation is inspired by
https://openjdk.org/jeps/446
A scope is introduced with the `scoped` function that takes a lambda to
execute within the new scope. The value of a `ScopedValue` is
constant within that scope and can only be set upon introduction
of a new scope.
Scopes are propagated across tasks boundaries.
Storage is implemented using a persistent dictionary.