GtkStack: Remove some clumsy use of GList API

No need for g_list_next(), and don't open-code g_list_index().