Use android::base::function_ref isntead of std::function

This removes an allocation from the binder RPC calls.

Test: atest binderAllocationLimits
Bug: 230625474
Change-Id: I70ebb4e320323149c3c66809f1077cbf332c07ef
diff --git a/libs/binder/tests/binderAllocationLimits.cpp b/libs/binder/tests/binderAllocationLimits.cpp
index b14ec55..dd1a8c3 100644
--- a/libs/binder/tests/binderAllocationLimits.cpp
+++ b/libs/binder/tests/binderAllocationLimits.cpp
@@ -208,8 +208,8 @@
         totalBytes += bytes;
     });
     CHECK_EQ(OK, remoteBinder->pingBinder());
-    EXPECT_EQ(mallocs, 4);
-    EXPECT_EQ(totalBytes, 108);
+    EXPECT_EQ(mallocs, 3);
+    EXPECT_EQ(totalBytes, 60);
 }
 
 int main(int argc, char** argv) {