editor: make Team config importing dialog modal and set parent window for it

Else the user could close the connection window and the dialog still referring
to it would make the editor crash.

Top level window fixed up by dcbw:
The widget may not be in a window at page init time, but is when the widget
is realized.  Get the toplevel parent at realize time.