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.

Bug # 9172

Signed-off-by: Alex Coles <alex@alexbcoles.com>
Merge pull request #1436 from opf/feature/work-packages-table-layout-false-fix

Fix broken Work Packages Table when ?layout=false