Purge linker block allocators before leaving linker

This is the second attempt to purge linker block allocators.  Unlike the
previously reverted change which purge allocators whenever all objects
are freed, we only purge right before control leaves the linker.  This
limits the performance impact to one munmap() call per dlopen(), in
most cases.

Bug: 112073665
Test: Boot and check memory usage with 'showmap'.
Test: Run camear cold start performance test.
Change-Id: I02c7c44935f768e065fbe7ff0389a84bd44713f0
diff --git a/linker/linker_main.cpp b/linker/linker_main.cpp
index b0c27dc..7486cd7 100644
--- a/linker/linker_main.cpp
+++ b/linker/linker_main.cpp
@@ -503,6 +503,10 @@
   fflush(stdout);
 #endif
 
+  // We are about to hand control over to the executable loaded.  We don't want
+  // to leave dirty pages behind unnecessarily.
+  purge_unused_memory();
+
   ElfW(Addr) entry = exe_info.entry_point;
   TRACE("[ Ready to execute \"%s\" @ %p ]", si->get_realpath(), reinterpret_cast<void*>(entry));
   return entry;