Remove dependency on glib mainloop and use purple_timeout_add/remove instead