Add a helper function to find a default leader for flg_manager.
Move some code from gui to engine (mp::connect).

The moved code is to set up ai::configuration and sending network data
at connect window creation.