change calls to exit into Gtk::Application::quit

this way destructors are called, and resources are properly freed

Conflicts:
	src/graph_disp.cpp