Add footnotes extension to showdown

refs 1318
- based on Markdown Extra https://michelf.ca/projects/php-markdown/extra/
- allows [^n] for automatic numbering based on sequence
Allow notifications to sit over the nav bar

Closes #4379

- Adjusts the `.viewport` `z-index` propetty to allow notificatons to sit over the nav bar

Looks like a weird fix, but inheritence of z-index was the issue here.
Introduce sitemap XSL template

Based on Yoast's All in One SEO plugin for WordPress implementation
Merge pull request #4559 from JohnONolan/sitemap-xsl

Introduce sitemap XSL template
URL safe base64 encoding

closes #3872
- updated base64 escaping to respect + and \
- updated base64 escaping to remove = during transport
- updated tests
Cleanup layout Sass

Continues on from #4441

- Reformats the layout Sass files (comments, white space)
- DRY up small chunks of CSS to make it more comprehensible
Merge pull request #4554 from sebgie/issue#3872

URL safe base64 encoding
Move ugly debug to Settings  Labs

 closes #4534

- Adds new Labs route
- Wires route in settings page
- Move and rename debug templates and logic to labs
- Redirect /debug to settings/labs
Merge pull request #4560 from cobbspur/labs

Move ugly debug to Settings  Labs
Change anchors without hrefs to buttons.
gh-trim-focus-input autofocus fix for iOS Safari

Closes #4446
- Mobile Safari doesn’t support the HTML5 `autofocus` attribute, but
also doesn’t play nice with jQuery’s `focus()` and `select()` methods.
- Mobile Safari wouldn’t automatically select the input field anyway,
so this PR simply removes the “jumping input fields” error without
changing any actual behaviour.
- Disallowing the programmatic selection of input fields (with select,
focus or similar methods) is apparently considered a feature rather
than a bug (ref http://bugs.jquery.com/ticket/12789)
- `autofocus` attribute is now only set on non-iOS devices
API - no more m-2-m relation ids by default

closes #4498

- remove toJSON code which returns only IDs from objects
- don't auto-include tags & fields in post responses
- don't auto-include roles in user responses
- fix #allthethings that made assumptions about the auto-includes, or otherwise were only working because of the auto-include
Merge pull request #4530 from ErisDS/issue-4498

API - no more m-2-m relation ids by default
Merge pull request #4550 from felixrieseberg/iss4446

gh-trim-focus-input autofocus fix for iOS Safari
Merge pull request #4568 from jaswilli/buttons

Change anchors without hrefs to buttons.
Merge pull request #4270 from mispy/footnotes2

Footnotes extension for Showdown
Merge pull request #4561 from PaulAdamDavis/sass-layout-cleanup

Cleanup layout Sass
Merge pull request #4544 from PaulAdamDavis/notification-over-nav

Allow notifications to sit over the nav bar
Remove console.log

Refs #4270
Merge pull request #4571 from jaswilli/cleanup-4270

Remove console.log