don't overwrite public flag for queries AFTER security check
move query menu item handling into QueryService
SaveAs for Queries also stars the new query of the old one was starred

fixes: https://www.openproject.org/work_packages/13573
adapt karma tests to the new load order
integration test for SaveAs function of a query
Merge pull request #1962 from opf/fix/13573_wiki_toolbar_entry

Fix/13573 wiki toolbar entry