Fix to make the framework asan compatible.

Free any used memory before exiting.

Replace all android::base functions so that it's not necessary to
include libbase as a whole static library. This fixes odr violationgs
that asan finds.

Replace the PLOG and LOG macros with FATAL_PLOG and FATAL_LOG macros
that don't use android::base.

Remove the definition of GetInitialArgs and change the code to check
if this weak function is defined before calling it.

Free the old listener to avoid leaking it away.

Test: Ran unit tests.
Test: Ran art/test/testrunner/ art-gtest-asan
Change-Id: Idb9fd31eaa53798fb5e4f72b64b9c170bd4d7996
7 files changed