Remove SystemState dependency from HttpFetcher and InstallPlan.

The SystemState class is an aggregation of all the update_engine
singletons, making it easy to handle cross-dependencies between these
singletons. Nevertheless, since we split the code into a smaller
libpayload_consumer library we need to remove the global dependencies
on the SystemState class from this library and specialize those
dependencies to the actual required class.

Bug: 25773375
TEST=FEATURES=test emerge-link update_engine; mma

Change-Id: I8800157c969db6a8d168f33ac2c6aad4f34fa236
diff --git a/common/libcurl_http_fetcher.cc b/common/libcurl_http_fetcher.cc
index 5a248e6..51643a4 100644
--- a/common/libcurl_http_fetcher.cc
+++ b/common/libcurl_http_fetcher.cc
@@ -29,7 +29,6 @@
 #include "update_engine/common/certificate_checker.h"
 #include "update_engine/common/hardware_interface.h"
 #include "update_engine/common/platform_constants.h"
-#include "update_engine/system_state.h"
 
 using base::TimeDelta;
 using brillo::MessageLoop;
@@ -47,11 +46,11 @@
 
 LibcurlHttpFetcher::LibcurlHttpFetcher(
     ProxyResolver* proxy_resolver,
-    SystemState* system_state,
+    HardwareInterface* hardware,
     std::unique_ptr<CertificateChecker> certificate_checker)
-    : HttpFetcher(proxy_resolver),
-      hardware_(system_state->hardware()),
-      certificate_checker_(std::move(certificate_checker)) {
+  : HttpFetcher(proxy_resolver),
+    hardware_(hardware),
+    certificate_checker_(std::move(certificate_checker)) {
   // Dev users want a longer timeout (180 seconds) because they may
   // be waiting on the dev server to build an image.
   if (!hardware_->IsOfficialBuild())