libhealthloop: Micro-optimize HealthLoop::RegisterEvent()

BoundFunction is an alias for std::function<>. Copying a function object
may be expensive. Use std::move() to avoid copying std::function<>. From
https://engdoc.corp.google.com/eng/doc/devguide/cpp/std_function.md:
"Generally prefer both accepting and passing by value if ownership is
transferred. Recall that when using value semantics, it's important to
also use std::move() when appropriate."

Bug: 203462310
Change-Id: I9fb87737dd5ce0fbb84bfbbdb0f8bb952dea1fbc
Signed-off-by: Bart Van Assche <bvanassche@google.com>
diff --git a/health/utils/libhealthloop/HealthLoop.cpp b/health/utils/libhealthloop/HealthLoop.cpp
index cf4b4cf..ba7e75a 100644
--- a/health/utils/libhealthloop/HealthLoop.cpp
+++ b/health/utils/libhealthloop/HealthLoop.cpp
@@ -52,10 +52,10 @@
 int HealthLoop::RegisterEvent(int fd, BoundFunction func, EventWakeup wakeup) {
     CHECK(!reject_event_register_);
 
-    auto* event_handler =
-            event_handlers_
-                    .emplace_back(std::make_unique<EventHandler>(EventHandler{this, fd, func}))
-                    .get();
+    auto* event_handler = event_handlers_
+                                  .emplace_back(std::make_unique<EventHandler>(
+                                          EventHandler{this, fd, std::move(func)}))
+                                  .get();
 
     struct epoll_event ev;