AU: Verify that the applied delta update matches the server-sent hashes.

Also, don't try to resume any delta update that fails for any reason
other than download transfer errors.

BUG=7348
TEST=unit tests, gmerged on device

Change-Id: Ice464b8d421256717d7909fd5fa46d762bd48952

Review URL: http://codereview.chromium.org/3599025
diff --git a/update_attempter_unittest.cc b/update_attempter_unittest.cc
index b8d85a1..bb86af7 100644
--- a/update_attempter_unittest.cc
+++ b/update_attempter_unittest.cc
@@ -17,6 +17,7 @@
 using testing::_;
 using testing::DoAll;
 using testing::InSequence;
+using testing::Ne;
 using testing::Property;
 using testing::Return;
 using testing::SetArgumentPointee;
@@ -131,6 +132,8 @@
       .WillOnce(DoAll(
           SetArgumentPointee<1>(UpdateAttempter::kMaxDeltaUpdateFailures),
           Return(true)));
+  EXPECT_CALL(prefs_, SetInt64(Ne(kPrefsDeltaUpdateFailures), _))
+      .WillRepeatedly(Return(true));
   EXPECT_CALL(prefs_, SetInt64(kPrefsDeltaUpdateFailures, 1)).Times(2);
   EXPECT_CALL(prefs_, SetInt64(kPrefsDeltaUpdateFailures, 2)).Times(1);
   EXPECT_CALL(prefs_, SetInt64(kPrefsDeltaUpdateFailures,