build: Remove useless gthread dependency

Since GLib 2.32, libgthread has been an empty stub, and just causes
unused-direct-shlib-dependeny warnings for packagers.

https://bugzilla.redhat.com/show_bug.cgi?id=1026764
lib: Fix strict-aliasing of sockaddr

This fixes a warning about dereferencing type-punned pointers
potentially breaking strict-aliasing rules.