Advances the RNG state by n steps and returns the new state.
Details
This function temporarily sets .Random.seed in .GlobalEnv
to advance the stream, then returns the new state. It does NOT permanently
modify the global .Random.seed (unless it did not exist before, in which
case it is removed after use). The caller is responsible for applying
the returned state if needed (e.g., via set_task_rng()).
Examples
if (FALSE) { # \dontrun{
streams <- create_task_rng_streams(42, 10)
advanced <- advance_rng_stream(streams[[1]], n = 5)
} # }