Implement stats logging in LMKD.

It implements logging of following atoms:
  -- LMK_STATE_CHANGED
  -- LMK_KILL_OCCURRED

We would like to gather memory metrics of the process killed by LMKD
because by gathering this info we would be able to analyze and improve
system health by potentially reducing memory footprint of the process.

This feature would be available on production builds.

To know more about this see: http://go/android-p-memory-metrics

Bug: 65738734
Test: Tested manually
Change-Id: I064e0cdcb47c3b4c95d8b8d5654050c9812008d8
diff --git a/lmkd/Android.bp b/lmkd/Android.bp
index fc31693..5e306ab 100644
--- a/lmkd/Android.bp
+++ b/lmkd/Android.bp
@@ -6,6 +6,9 @@
         "liblog",
         "libcutils",
     ],
+    static_libs: [
+        "libstatslogc",
+    ],
     local_include_dirs: ["include"],
     cflags: ["-Werror"],
 
@@ -20,7 +23,7 @@
     },
 }
 
-cc_library_shared {
+cc_library_static {
     name: "libstatslogc",
     srcs: ["statslog.c"],
     cflags: [