MediaMetrics: Update to use STL containers

Test: dumpsys media.metrics sanity
Change-Id: Ifcada098e755ef3d679715ed23fab9d793ebde3e
diff --git a/media/libmediametrics/include/MediaAnalyticsItem.h b/media/libmediametrics/include/MediaAnalyticsItem.h
index 42a2f5b..3024c84 100644
--- a/media/libmediametrics/include/MediaAnalyticsItem.h
+++ b/media/libmediametrics/include/MediaAnalyticsItem.h
@@ -119,7 +119,7 @@
         // set the key discriminator for the record.
         // most often initialized as part of the constructor
         MediaAnalyticsItem &setKey(MediaAnalyticsItem::Key);
-        MediaAnalyticsItem::Key getKey();
+        const MediaAnalyticsItem::Key& getKey() const { return mKey; }
 
         // # of attributes in the record
         int32_t count() const;
@@ -191,8 +191,8 @@
         // supports the stable interface
         bool dumpAttributes(char **pbuffer, size_t *plength);
 
-        std::string toString();
-        std::string toString(int version);
+        std::string toString() const;
+        std::string toString(int version) const;
         const char *toCString();
         const char *toCString(int version);