shill: Fix most of warnings from cpplint

Fix most cpplinter's warnings. On a few occasisions, the warnings
produced were false-positives, so added explicit // NOLINT comment
overrides.

There were a few instances of disallowed non-const reference usage
(reported as runtime/reference error by cpplint) for
"DBus::Error &error" which should potentially be changed
to pointers to comply with C++ coding style but I will let Shill
owners do that since there is quite a few of those and the
change isn't brain-dead simple...

BUG=None
TEST=platform2 still compiles and all unit tests pass.

Change-Id: Ic2e31896aa13d20eeb1a85dee74f3db8cccfde2e
Reviewed-on: https://chromium-review.googlesource.com/204164
Tested-by: Alex Vakulenko <avakulenko@chromium.org>
Reviewed-by: mukesh agrawal <quiche@chromium.org>
Commit-Queue: Alex Vakulenko <avakulenko@chromium.org>
diff --git a/metrics.h b/metrics.h
index 457346d..d86f064 100644
--- a/metrics.h
+++ b/metrics.h
@@ -6,6 +6,8 @@
 #define SHILL_METRICS_H_
 
 #include <list>
+#include <map>
+#include <string>
 
 #include <base/memory/scoped_vector.h>
 #include <metrics/metrics_library.h>
@@ -733,7 +735,7 @@
     TimerReportersByState start_on_state;
     TimerReportersByState stop_on_state;
   };
-  typedef std::map<const Service *, std::tr1::shared_ptr<ServiceMetrics> >
+  typedef std::map<const Service *, std::shared_ptr<ServiceMetrics> >
       ServiceMetricsLookupMap;
 
   struct DeviceMetrics {
@@ -748,7 +750,7 @@
     scoped_ptr<chromeos_metrics::TimerReporter> auto_connect_timer;
     int auto_connect_tries;
   };
-  typedef std::map<const int, std::tr1::shared_ptr<DeviceMetrics> >
+  typedef std::map<const int, std::shared_ptr<DeviceMetrics> >
       DeviceMetricsLookupMap;
 
   static const uint16 kWiFiBandwidth5MHz;