Add an utility to get the list of windows

Now that we also register the preferences dialog as a GtkApplication
window we need to be more careful when looping through all the windows