Fixes for darling-coredump to produce usable coredumps
It seems that LLDB expects any region listed as a load command to be
present in the core file, even regions with a reported file size of 0.
So instead, let's do the same thing LLDB does when saving core dumps and
just zero out those regions.
Previously, we were getting lots of "missing NT_FILE" warnings, but these
were actually wrong. It seems that if a region in the ELF core dump has
a file size of 0 and there's no corresponding NT_FILE entry, this means
it doesn't actually reside in a file (as usually indicated by a program
header file size of 0); instead, it means that the region was simply
zero-filled and the kernel did not include it in the core dump.
An additional fix has also been added that allows the main executable to
be detected even when the prefix is unmounted. This is just applying the
same logic we were already using when reading from files in the
read-and-dump stage.