Rough port of the v3.1 Footnotes plugin to v4.0
Merge pull request #3140 from pjackson28/footnotesplugin

Rough port of the v3.1 Footnotes plugin to v4.0