Fixes some memory leaks

When moving between pages, spies did not get unregistered from the scrollspy directive. This resulted in more and more stale spies being registered, each holding references to DOM elements, which then could not be garbage collected by the browser.