Merge changes I2a437363,I27226885 into main

* changes:
  Use std::function instead of base::function_ref
  Use std::unique_ptr instead of ScopeGuard

GitOrigin-RevId: 9636af27d208552aa679437cbf3e292a6033a23d
Change-Id: Iff80dadf73ff9cb22ee8e0ad6a463e29fb12f115
17 files changed
tree: 1c589c6e2f4bccc81500c444cdca683c7f6cf5f4
  1. libs/