update_engine: Fix bug in MemoryPrefs::MemoryStorage::DeleteKey()

PrefsInterface specifies that Delete(key) will delete the key if it
exists, and do nothing if it doesn't. The behaviour in MemoryPrefs is
not consisten with this, and behaves differently than Prefs.

BUG=None
TEST=cros_workon_make update_engine --test

Change-Id: I664eba56d7d365307ce420ed48f1cf0a4c6beeda
Reviewed-on: https://chromium-review.googlesource.com/c/aosp/platform/system/update_engine/+/2159295
Tested-by: Andrew Lassalle <andrewlassalle@chromium.org>
Commit-Queue: Amin Hassani <ahassani@chromium.org>
Auto-Submit: Andrew Lassalle <andrewlassalle@chromium.org>
Reviewed-by: Jae Hoon Kim <kimjae@chromium.org>
Reviewed-by: Amin Hassani <ahassani@chromium.org>
diff --git a/common/prefs_unittest.cc b/common/prefs_unittest.cc
index cb6fc70..3f29319 100644
--- a/common/prefs_unittest.cc
+++ b/common/prefs_unittest.cc
@@ -358,7 +358,7 @@
 
   EXPECT_TRUE(prefs_.Delete(kKey));
   EXPECT_FALSE(prefs_.Exists(kKey));
-  EXPECT_FALSE(prefs_.Delete(kKey));
+  EXPECT_TRUE(prefs_.Delete(kKey));
 }
 
 }  // namespace chromeos_update_engine