Clear searchbar when switching back to Viewer.

Added a $routeChangeStart handle to the AppController which checks if we're to go back to the Viewer then it clears the searchbar and also clears the search query from localstorage
A solution for #643
Tweaks for leaving search

- Remove redunduncy from the code paths	for closing search
- Add some comments
Merge pull request #657 from hypothesis/643-leaving-search-view-closes-search-bar

Close the searchbar when switching to a different view.

Fixes #643.