libpower: pass static-duration strong pointer as const reference.

With this change:
1. We avoid constructing a strong pointer on every call to
getSystemSuspendServiceOnce().
2. In case the function static pointer is corrupted, the error
propagates to the API call where we're able to handle the errors instead
of the compiler-generated code in the return statement of
getSystemSuspendServiceOnce().

Bug: 117575503
Test: device builds/boots
Change-Id: I85b5616efca25063c876b242529e2bf561f5b834
diff --git a/power.cpp b/power.cpp
index 2e6d806..c4f2036 100644
--- a/power.cpp
+++ b/power.cpp
@@ -35,14 +35,14 @@
 static std::mutex gLock;
 static std::unordered_map<std::string, sp<IWakeLock>> gWakeLockMap;
 
-static sp<ISystemSuspend> getSystemSuspendServiceOnce() {
+static const sp<ISystemSuspend>& getSystemSuspendServiceOnce() {
     static sp<ISystemSuspend> suspendService = ISystemSuspend::getService();
     return suspendService;
 }
 
 int acquire_wake_lock(int, const char* id) {
     ATRACE_CALL();
-    sp<ISystemSuspend> suspendService = getSystemSuspendServiceOnce();
+    const auto& suspendService = getSystemSuspendServiceOnce();
     if (!suspendService) {
         return -1;
     }