Initialize the CertificateChecker on Android.

The CertificateChecker singleton is a class that keeps track of the
SSL certificates seen for the download and updatecheck servers. In
Android devices, we use the download server only, but the class was not
initialized leading to CURLE_FAILED_INIT failure and a log message,
except that DLOG messages are not shown on "release" builds and
therefore the message was lost.

This patch initializes the certificate checker class, allowing
update_engine to download HTTPS files.

Bug: 29585834
TEST=Tested on a device that update_engine can download a payload
directly from an https:// URL.

(cherry picked from commit 765580d3e99d92b4796667a60113492dbee4c469)

Change-Id: Ic07741b0dcc7fad132cc4a1db4dba402725595df
diff --git a/daemon_state_android.cc b/daemon_state_android.cc
index cf1e892..0960b1a 100644
--- a/daemon_state_android.cc
+++ b/daemon_state_android.cc
@@ -58,6 +58,11 @@
     return false;
   }
 
+  // The CertificateChecker singleton is used by the update attempter.
+  certificate_checker_.reset(
+      new CertificateChecker(prefs_.get(), &openssl_wrapper_));
+  certificate_checker_->Init();
+
   // Initialize the UpdateAttempter before the UpdateManager.
   update_attempter_.reset(new UpdateAttempterAndroid(
       this, prefs_.get(), boot_control_.get(), hardware_.get()));
diff --git a/daemon_state_android.h b/daemon_state_android.h
index 5db3ef0..69180bc 100644
--- a/daemon_state_android.h
+++ b/daemon_state_android.h
@@ -64,6 +64,11 @@
 
   // The main class handling the updates.
   std::unique_ptr<UpdateAttempterAndroid> update_attempter_;
+
+  // OpenSSLWrapper and CertificateChecker used for checking changes in SSL
+  // certificates.
+  OpenSSLWrapper openssl_wrapper_;
+  std::unique_ptr<CertificateChecker> certificate_checker_;
 };
 
 }  // namespace chromeos_update_engine