Reset the LCMS log handlers to default after use

This ensures we don't call the function pointer and try to use a destroyed object.

Fixes one half of https://bugzilla.redhat.com/show_bug.cgi?id=1016425
Use the threadsafe versions of the LCMS functions

Fixes the other half of: https://bugzilla.redhat.com/show_bug.cgi?id=1016425
trivial: Fix up three GObjectIntrospection warnings