Move MaybeReleaseAllocatorMemToOS to base

This CL refactors the calls to mallopt(M_PURGE) into
a base/utils.h function. It also makes it work consistently
on standalone builds using dlsym.
Unfortunately looks like we will have to put more workarounds
to deal with Scudo edge cases. See bug for discussion.
This CL will be used by the upcoming kallsyms symbolizer.

Bug: 170217718
Change-Id: I4d418aac2ab6bb90120f1703e1055426e54c59a5
diff --git a/BUILD b/BUILD
index b50e0da..aa3104e 100644
--- a/BUILD
+++ b/BUILD
@@ -554,6 +554,7 @@
         "src/base/thread_task_runner.cc",
         "src/base/time.cc",
         "src/base/unix_task_runner.cc",
+        "src/base/utils.cc",
         "src/base/uuid.cc",
         "src/base/virtual_destructors.cc",
         "src/base/waitable_event.cc",