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