Move metrics time helpers to metrics_utils.

The metrics module reports metrics periodically, for which it needs to
keep track of the duration since some events (for example, the update
finished). These helpers were in the common/utils.h, but they rely on
the global SystemState to access both Prefs and Clock.

Since these helpers are specific to the metric reporting, this CL moves
them to the metrics_utils.h module.

Bug: 25197634
TEST=FEATURES=test emerge-link update_engine; mmma system/update_engine

Change-Id: Ia48091adbdc56c339c69c86c91c5c01aa58c54fb
diff --git a/payload_state.cc b/payload_state.cc
index 6b7b0fb..8594f28 100644
--- a/payload_state.cc
+++ b/payload_state.cc
@@ -22,6 +22,7 @@
 #include <base/logging.h>
 #include <base/strings/string_util.h>
 #include <base/strings/stringprintf.h>
+#include <metrics/metrics_library.h>
 #include <policy/device_policy.h>
 
 #include "update_engine/common/clock.h"