update_engine: Fix all the "using" declaration usage.

This patch removes unused "using" declarations, that is, declarations
included in a .cc file at a global scope such that "using foo::bar"
that later don't use the identifier "bar" at all.

This also unifies the usage of these identifiers in the .cc files
in favor of using the short name defined by the using declaration.
For example, in several cases the .h refer to a type like
"std::string" because using declarations are forbidden in header
files while the .cc includes "using std::string;" with the purpose
of just writting "string" in the .cc file. Very rarely, the full
identifier is used when a local name ocludes it, for example,
StringVectorToGStrv() and StringVectorToString() in utils.cc named
its argument just "vector" need to refer to std::vector with the
full name. This patch renames those arguments instead.

Finally, it also sorts a few lists of using declarations that weren't
in order.

BUG=None
TEST=FEATURES=test emerge-link update_engine

Change-Id: I30f6b9510ecb7e03640f1951c48d5bb106309840
Reviewed-on: https://chromium-review.googlesource.com/226423
Reviewed-by: Alex Vakulenko <avakulenko@chromium.org>
Commit-Queue: Alex Deymo <deymo@chromium.org>
Tested-by: Alex Deymo <deymo@chromium.org>
diff --git a/payload_state.cc b/payload_state.cc
index fcd4dab..4ce3d67 100644
--- a/payload_state.cc
+++ b/payload_state.cc
@@ -577,8 +577,8 @@
   int64_t payload_bytes_downloaded = attempt_num_bytes_downloaded_;
 
   ClockInterface *clock = system_state_->clock();
-  base::TimeDelta duration = clock->GetBootTime() - attempt_start_time_boot_;
-  base::TimeDelta duration_uptime = clock->GetMonotonicTime() -
+  TimeDelta duration = clock->GetBootTime() - attempt_start_time_boot_;
+  TimeDelta duration_uptime = clock->GetMonotonicTime() -
       attempt_start_time_monotonic_;
 
   int64_t payload_download_speed_bps = 0;
@@ -789,7 +789,7 @@
   metric = "Installer.DownloadSourcesUsed";
   LOG(INFO) << "Uploading 0x" << std::hex << download_sources_used
             << " (bit flags) for metric " << metric;
-  int num_buckets = std::min(1 << kNumDownloadSources, kNumDefaultUmaBuckets);
+  int num_buckets = min(1 << kNumDownloadSources, kNumDefaultUmaBuckets);
   system_state_->metrics_lib()->SendToUMA(metric,
                                           download_sources_used,
                                           0,  // min
@@ -906,7 +906,7 @@
   ResetRollbackVersion();
   SetP2PNumAttempts(0);
   SetP2PFirstAttemptTimestamp(Time());  // Set to null time
-  SetScatteringWaitPeriod(base::TimeDelta());
+  SetScatteringWaitPeriod(TimeDelta());
 }
 
 void PayloadState::ResetRollbackVersion() {
@@ -1031,7 +1031,7 @@
       TimeDelta::FromSeconds(GetPersistedValue(kPrefsWallClockWaitPeriod)));
 }
 
-void PayloadState::SetScatteringWaitPeriod(base::TimeDelta wait_period) {
+void PayloadState::SetScatteringWaitPeriod(TimeDelta wait_period) {
   CHECK(prefs_);
   scattering_wait_period_ = wait_period;
   LOG(INFO) << "Scattering Wait Period (seconds) = "