add some tests of loc2c.c

this transcribes the pr10770.c test case into the DWARF assembler,
then uses this to do some coverage testing of loc2c.c.
this found a number of bugs.
this patch refactors some parts of loc2c.c a bit to make it
nicer: now labels are only emitted when needed, and now the DWARF
operation's name is printed in a comment.
there's also a few minor upgrades to dwarf.exp.