Add functions to securely fill memory with zeros.

Various places are using "memset(ptr, 0, size)" which might get optimized
away by the compiler if "ptr" is not used afterwards. The new functions
can be used to securely clear memory instead.

Bug: None
Change-Id: I067a51d17ff84d95dc4934d46a24027fbcb4825d
Reviewed-on: https://webrtc-review.googlesource.com/35500
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Joachim Bauch <jbauch@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21706}
diff --git a/rtc_base/BUILD.gn b/rtc_base/BUILD.gn
index 0b8e9ae..c665e03 100644
--- a/rtc_base/BUILD.gn
+++ b/rtc_base/BUILD.gn
@@ -549,6 +549,7 @@
     ":checks",
     ":stringutils",
     "..:webrtc_common",
+    "../api:array_view",
     "../api:optional",
   ]
   public_deps = [
@@ -655,6 +656,8 @@
     "stream.h",
     "thread.cc",
     "thread.h",
+    "zero_memory.cc",
+    "zero_memory.h",
   ]
 
   visibility = [
@@ -1090,6 +1093,7 @@
       "stream_unittest.cc",
       "testclient_unittest.cc",
       "thread_unittest.cc",
+      "zero_memory_unittest.cc",
     ]
     if (is_win) {
       sources += [
@@ -1110,6 +1114,7 @@
       ":rtc_base_tests_main",
       ":rtc_base_tests_utils",
       ":stringutils",
+      "../api:array_view",
       "../api:optional",
       "../test:test_support",
     ]