TeamMonitorTest: fix build, exit on window close.
TeamMonitor: layout cleanup.

Fixes #7560.