Add support for footnotes

Courtesy of @bdolman and @adamflorin
Fix footnote parsing

Allow the following, courtesy of @microjo:

[^1]: footnote1
[^2]: footnote2
Add newline before footnotes div
Add footnotes test