fix malloc (unalloc) bug when same server checked multiple time due to presence in multiple master server or multiple game, and replace deprecated gdk_input_remove call by g_source_remove (since GLib 2.40.0)