metricsd: Make the unit tests pass.

This cleans up the unit tests and update them to pass.

Cleaned up:
* removed the irrelevant bits.
* Used ScopedTempDir for all test specific files (instead of the current
  directory).
* Update some objects to make them more easily testable.
* Group all the test in a single binary and use bionic's test runner.

BUG: 23682444
Change-Id: I289e3a5ff89968fdecd4a156e93bc38bbc25f58b
diff --git a/metricsd/metrics_daemon.cc b/metricsd/metrics_daemon.cc
index 5855cee..dcd634e 100644
--- a/metricsd/metrics_daemon.cc
+++ b/metricsd/metrics_daemon.cc
@@ -195,10 +195,10 @@
 }
 
 void MetricsDaemon::RunUploaderTest() {
-  upload_service_.reset(new UploadService(new SystemProfileCache(true,
-                                                                 config_root_),
-                                          metrics_lib_,
-                                          server_));
+  upload_service_.reset(new UploadService(
+      new SystemProfileCache(true, base::FilePath(config_root_)),
+      metrics_lib_,
+      server_));
   upload_service_->Init(upload_interval_, metrics_file_);
   upload_service_->UploadEvent();
 }