parser.leg.go: in actions, sort local variable names
add a test for issue 10 (footnotes not working)
elemheap: don't reuse elements if they are still referenced
fix footnote formatting