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/Android.bp b/Android.bp
index 0f0cc57..3205c62 100644
--- a/Android.bp
+++ b/Android.bp
@@ -6023,6 +6023,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",