Integrate signal handling with the GLib main loop
Set dependency to '>=glib-2.36' as needed by the glib signal handler
Merge pull request #189 from Necoro/fix_signal

Fix signal handling to avoid deadlocks