Ignore closure callbacks when Python is not initialized

Add an immediate return in ffi closures if Python is not initialized.
This fixes rare events when which lead to a segfault when a process
is exiting.

https://bugzilla.gnome.org/show_bug.cgi?id=722562