util: improve logging of unrecognized GErrors

If a GError is not from a known domain, it will be marshalled as
a regular boxed type, and thus will not have the special toString()
that logError() relies on for type and message.
Recognize that case and extract the information from the GError
structure directly.

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