Remove some "unsafe" import keywords

Some of these may potentially be reentrant into Haskell code (the
easiest example to hit is probably g_object_set_property, which can
easily trigger a callback), so the import should not be marked "unsafe".

We are playing it very safe here, in particular we are not marking
things like g_malloc0 as "unsafe", since somebody may need to write a
custom memory allocator in Haskell, and the memory allocators in GLib
are pluggable. Better safe than sorry, even if there is probably nobody
crazy enough to try this...
Autodetect module dependencies

The dependencies of the module given in the command line are now
autodetected, and they are autogenerated too.

The main use of this is in order to generate the "_property" accesors.
Before it was problematic to use accessors from two different modules,
since the relevant typeclasses may have overlapping names. Now all
possible property names are collected, and generated at the end,
avoiding this problem.