Fix work packages menu item never being selected

For query menu items this already worked, but the work packages main
item was never selected.
Fix work packages menu item always being selected

This adds a check to only mark query menu items when being on the work
packages page.

Not very pretty, but I couldn't think of a better way to distinguish
work package pages from others.
Query Menu Items JS: Simplify comparison
Merge pull request #2005 from opf/fix/wp_menu_item_not_selected

Fix work packages menu item never being selected