clean up annotation code a little

--HG--
extra : amend_source : 9e1c6980d3fd2fa2d1cd0e882f7e186c3a08c7e5
fix off-by-one in line number annotations
simplify HTML templating in annotated file writer
minor code streamlining
whitespace
reduce inline CSS class overhead a little and tighten C code specific selectors in the CSS template