Remove SystemState references from DeltaPerformer.

DeltaPerformer is used as part of the DownloadAction and had
references to the global SystemState. The common references to
BootControlInterface (to query the partitions based on the names
from the payload) and the HardwareInterface (for dev-mode bits) are
now referenced directly from the DeltaPerformer. The calls to
UpdateAttempter and PayloadState were moved to the
DownloadActionDelegate since these calls are received by classes
outside the payload_consumer.

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

Change-Id: Id2e81d5ccf835cad22f03b069c681dcce104c456
diff --git a/payload_consumer/download_action.cc b/payload_consumer/download_action.cc
index 58e29b2..cb404b8 100644
--- a/payload_consumer/download_action.cc
+++ b/payload_consumer/download_action.cc
@@ -182,7 +182,9 @@
     LOG(INFO) << "Using writer for test.";
   } else {
     delta_performer_.reset(new DeltaPerformer(prefs_,
-                                              system_state_,
+                                              system_state_->boot_control(),
+                                              system_state_->hardware(),
+                                              delegate_,
                                               &install_plan_));
     writer_ = delta_performer_.get();
   }
@@ -254,8 +256,10 @@
   }
 
   bytes_received_ += length;
-  if (delegate_ && download_active_)
-    delegate_->BytesReceived(bytes_received_, install_plan_.payload_size);
+  if (delegate_ && download_active_) {
+    delegate_->BytesReceived(
+        length, bytes_received_, install_plan_.payload_size);
+  }
   if (writer_ && !writer_->Write(bytes, length, &code_)) {
     LOG(ERROR) << "Error " << code_ << " in DeltaPerformer's Write method when "
                << "processing the received payload -- Terminating processing";