ISIS-537 Use event pubsub instead of global JS functions. Tidy up jquery.isis.wicket.viewer.js (strict mode)

https://trello.com/c/4zVNtcGc/69-the-todo-app-s-prototyping-go-to-docs-action-is-failing-js-issue