mainloop: Allow reentrancy and removing sources
mainloop: Allow reentrancy and removing sources

Timeouts now return ids, and should return False to be removed.

Second, ensure that we're not iterating over lists when calling back
to user code, since the user code may try to modify the list.

vrutkovs/vrutkovs.github.io,djdeath/gnome-ostree,GNOME/gnome-ostree,chergert/gnome-continuous,chergert/gnome-continuous,chergert/gnome-continuous,GNOME/gnome-ostree,vrutkovs/vrutkovs.github.io,djdeath/gnome-ostree,GNOME/gnome-ostree,djdeath/gnome-ostree,vrutkovs/vrutkovs.github.io