dumpstate: Further cleanups related to new stack dumping scheme.
- Rewrite AddDumpFds to iterate over all files in the dump directory
instead of assuming a specific file pattern. This gives us additional
flexibility in generating dump file names.
- Fix a bug in deducing the value of is_global_stack_trace_file.
- Add a better section header for the most recent ANR dump. The most
recent dump will be titled "VM TRACES AT LAST ANR" and all others will
be titled "HISTORICAL ANR". Also fixes the sort order so that the most
recent ANR shows up first.
Bug:
36024548
Test: Manual; adb bugreport
Change-Id: I461712954d033ef3a3911d5b419a101cac71c8fb