Reorder operations in _kqsub_cancel() to prevent races.
Reorder operations in _kqsub_cancel() to prevent races.

Removing the event and closing the related file descriptor must be
done first to make sure the kqueue subsystem delete pending events.

The timeout must be disarmed before freeing the directory dependency
list otherwise it might populate it again.

https://bugzilla.gnome.org/show_bug.cgi?id=795193

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