Tidy up footnotes

Swap MD and CT footnote texts so they are notes for the right items
(hat tip @lajoiem, fixes #25), use autoincrementing counter, place the
footnote marker *after* punctuation, disable hyperfootnotes as they
don't work from within tables.