Fix bug 973961 - remove search parameter from document URLs and store search

results temporarily in session storage instead of local storage.

The empty session storage is filled on the first result page that is clicked
on via an AJAX request.