Add core::scope, an RAII scope guard utility