Clearing query from service cache. Fixes all issues in tickets #10851 & ...

https://www.openproject.org/work_packages/10859
https://www.openproject.org/work_packages/10851
yes exactly there, but with a check for ``$stateparams.query_id === null``