DrmManager: locally aggregate API metrics

Aggregate DrmManager API invocation counts per plugin over at least
fixed period of time before sending metrics to mediametrics service.

The default period is 1 day; the period is configurable through the
property drmmanager.metrics.period.

Bug: 134789967
Test: dumpsys media.metrics
Change-Id: I2cf28f1dfaa485ca319360705b872eed995b3d7f
diff --git a/drm/drmserver/Android.bp b/drm/drmserver/Android.bp
index fd71837..f427834 100644
--- a/drm/drmserver/Android.bp
+++ b/drm/drmserver/Android.bp
@@ -26,11 +26,13 @@
     shared_libs: [
         "libmedia",
         "libmediametrics",
+        "libcutils",
         "libutils",
         "liblog",
         "libbinder",
         "libdl",
         "libselinux",
+        "libstagefright_foundation",
     ],
 
     static_libs: ["libdrmframeworkcommon"],