[BOLT]DWARF] Eagerly write out loclists
Taking advantage of us being able to re-write .debug_info to reduce memory
footprint loclists. Writing out loc-list as they are added, similar to how
we handle ranges.
Collected on clang-14
trunk
4:41.20 real, 389.50 user, 59.50 sys, 0 amem,
38412532 mmem
4:30.08 real, 376.10 user, 63.75 sys, 0 amem,
38477844 mmem
4:25.58 real, 373.76 user, 54.71 sys, 0 amem,
38439660 mmem
diff
4:34.66 real, 392.83 user, 57.73 sys, 0 amem,
38382560 mmem
4:35.96 real, 377.70 user, 58.62 sys, 0 amem,
38255840 mmem
4:27.61 real, 390.18 user, 57.02 sys, 0 amem,
38223224 mmem
Reviewed By: maksfb
Differential Revision: https://reviews.llvm.org/D126999