libdw: Refactor dwarf_next_lines and fix skipped CU
dwarf_next_lines has two loops over CUs: one from the CU after the given
CU to the end, and one from the first CU up to _but not including_ the
given CU. This means that the given CU is never checked.
This is unlikely to matter in practice since CUs usually correspond 1:1
with line number tables in the same order, but let's fix it anyways.
Refactoring it to one loop fixes the problem and simplifies the next
change to support DWARF package files.
* libdw/dwarf_next_lines.c (dwarf_next_lines): Refactor loops
over CUs into one loop.