gmain: Fix next_source refcounting in g_source_iter_next
The g_source_unref_internal call can drop the context lock, during which next_source can be free'd behind our backs, after which things can get crashy. Move the next_source ref earlier to avoid this.
Fixes: #2031 (closed)
Signed-off-by: Cole Robinson crobinso@redhat.com