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
9 files changed