Update side nav based on page being currently viewed.
cleanup after previous commit

* add forgotten occasions where 'page' can be set, so that always the
  correct page is shown.
* re-assure page is always set to something to avoid breakage
* fix an occasion where page was set in the wrong scope (edit template
  instead of page())
* show extra metadata again under navigation where appropriate (ops report)
* remove unneeded python logic for setting active links