Add guards against invalid GSources to public GSource API
Add guards against invalid GSources to public GSource API

Especially check for a valid reference count. This is possible now in
all cases because of the addition of the dispose function and makes
usage of already finalized/finalizing GSources more obvious than the
use-after-free that would otherwise happen.

endlessm/glib,endlessm/glib,endlessm/glib,endlessm/glib,endlessm/glib