Smarter footnote handling

Make referencing easier by keeping footnotes on the same page as content, and split it across columns, if needed.