simpleperf: fix reading dex files for unwinding while recording.

When simpleperf does unwinding while recording, it processes mmap
records before reading dex file linked list (via JITDebugReader).
To process mmap records, it creates Dso objects of type ELF_FILE.
Then after reading dex file linked list, it realizes some ELF_FILE Dso
should actually be DEX_FILE.

So this patch supports converting Dso objects of type ELF_FILE
into DEX_FILE when they have dex file offsets.

Bug: http://b/73126888
Test: run simpleperf_unit_test.
Test: run `simpleperf record -g --no-post-unwind` on an app.

Change-Id: I580a382724b17c1396a7f52d7b3f5df45bcbcfb7
7 files changed