"am dumpheap" is now synchronous.

- Wait until the dump finishes before returning.
- Also now the filename argument is optional, with the default name of:
"/data/local/tmp/heapdump-yyyymmdd-hhmmss.prof"

Test: adb shell am dumpheap system
Test: adb shell am dumpheap system /data/local/tmp/heapdump.prof
Change-Id: I6a4c815015b731a30ffbdda5a32da541c0b790ec
Fixes: 79413767
Fixes: 62189236
6 files changed