Saving heap dump immediately as reported by StrictMode

Can do this via API with the exact heap state that triggered the
callback because using API allows to avoid deadlock that we'd have in
main thread if we used shell command.

checkDetectedLeaks() is still needed, as I'll add throwing an
exception there soon.

Bug: 139137636
Change-Id: I3c8670071b058c5c146ac58bb16152c980553065
1 file changed