Convert sessions watchdog to use a glib mainloop