Adjust some existing tests so they are run with an explicit -gdwarf-4
and add an -gdwarf-5 variant to make testing independent of the gcc
default DWARF version. The tests that might generate a DWARF5 line
table work for both version 4 and 5 and some also ignore stderr output
when using -p.debug_line_str because some combinations of gcc/binutils
generate DWARF5 debug info with DWARF4 debug line tables, even when
-gdwarf-5 is given.
Tested against GCC10, which defaults to DWARF4 and GCC11, which defaults
to DWARF5.