metricsd: Persist the report to disk if an upload fails.

If the metrics server is unreachable, we may need to resend a metrics
report later. Instead of keeping the staged report in memory, save it to
disk to avoid loosing data if the system restarts or crashes.

BUG: 23033262
TEST: unit tests.

Change-Id: Idd14964e40f022952469f47d675d8cda9586d7cd
diff --git a/metricsd/constants.h b/metricsd/constants.h
index 021bc73..717e5d2 100644
--- a/metricsd/constants.h
+++ b/metricsd/constants.h
@@ -23,6 +23,8 @@
 static const char kMetricsGUIDFileName[] = "Sysinfo.GUID";
 static const char kMetricsServer[] = "https://clients4.google.com/uma/v2";
 static const char kConsentFileName[] = "enabled";
+static const char kStagedLogName[] = "staged_log";
+static const char kFailedUploadCountName[] = "failed_upload_count";
 static const char kDefaultVersion[] = "0.0.0.0";
 
 // System properties used.