fix #11518: update Insight UI context menu tests (rebased)

Insight's UI changed and the context menu tests had to change accordingly. This required extension of functionality so that the relevant keywords could work down into submenus.

This PR fixes https://trac.openmicroscopy.org.uk/ome/ticket/11518 to make `./build.py -f components/tests/ui/build.xml ui-test-insight -DTEST=menus` pass.

In general, the tests seem to pass far more reliably locally than on Hudson.

--rebased-from #1606