Merge pull request #8630 from leoetlino/scopeguard Common: Avoid std::function overhead in ScopeGuard