scope

跨代宿主状态与外部回调清理入口。

在旧代码的 prepare 中,scope 会先保存状态、再执行已登记的清理动作;在新代码的 restore 中,状态会在 onTargetReady 回调前恢复。