components-gtk: add Quit component
runtime: improve mainloop switching