osinfo_list: update to modern GObject conventions and cleanup unsafe code
While researching a crash in gnome-boxes I found a bunch of unsafe code in libosinfo:osinfo_list leading to crashes in gnome-boxes, and likely other users of the library:
See: https://gitlab.gnome.org/GNOME/gnome-boxes/issues/433
The problem is exposed when using libosinfo installed to your jhbuild prefix, but without an osinfo-db installation, meaning, no media info.
This branch fixes these issues and updates osinfo_list to modern GObject conventions.
If approved, I think I would squash this into a single commit and rewrite the commit message.
Looking forward to your comments.