Fixes for navigation

Summary of changes:
* Adds trailing slash to untrailed paths.
* Makes back button work compatibly with other navigation
* Hides sidebar if content node is reclicked while active.
* Adds polyfill for add and remove event listener DOM element methods.