Fix flaky modelview test by checking that ports are free before starting
Probe for a free port pair with a throwaway QTcpServer before
configuring the real host/registry objects, retrying with a new pair on
failure, and QVERIFY the setup calls so any remaining failure becomes a
clean test failure instead of a crash.
Fixes: QTBUG-150497
Change-Id: Icfba24c2a0ebd9b6836447e22d3bf06b4aed5ebd
Reviewed-by: Qt Review Bot <qt_reviewbot@qt-project.org>
Reviewed-by: Frederic Lefebvre <frederic.lefebvre@qt.io>