Support for callbacks

There is a subtlety for ScopeTypeAsync callbacks: callbacks of this type
get called just once, and the semantics is that one can free the memory
associated with the callback once that is done.

Unfortunately freeHaskellFunctionPtr is not necessarily safe to call
from inside the function itself, so after calling the function we
schedule a function for releasing the memory one second after (using
g_timeout_add_seconds). A cleaner mechanism would be to write a C
marshaler for each function that frees the memory after the call, but
unfortunately that is rather more complicated.