Fix crash in new DWARF indexer
PR gdb/29128 points out a crash in the new DWARF index code. This
happens if the aranges for a CU claims a PC, but the symtab that is
created during CU expansion does not actually contain the PC. This
can only occur due to bad debuginfo, but at the same time, gdb should
not crash.
This patch fixes the bug and further merges some code into
dwarf2_base_index_functions. This merger helps prevent the same issue
from arising from the other index implementations.
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29128