Fix broken Work Packages Table when ?layout=false

Certain features, such as display of grouping headlines, appear to be
broken with layout hidden.

This bug helped banish another Prototype usage (`Element#getHeight()`)
from the code base. Using chainable `angular.element` (jQLite/jQuery)
we can handle a missing top-menu gracefully.

https://www.openproject.org/work_packages/9172