gsocket: improve sockopt handling for IPv4-wrapped-IPv6 sockets
gsocket: improve sockopt handling for IPv4-wrapped-IPv6 sockets

On IPv6 sockets, set both the IPv4 and IPv6 versions of IP socket
options, in case the socket is (or might become) IPv4-wrapped. (But
ignore errors when setting the IPv4 version.)

Similarly, when joining or leaving a multicast group, pick the sockopt
to use based on the address family of the multicast address rather
than the address family of the socket.

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

djdeath/glib,Distrotech/glib,tchakabam/glib,mzabaluev/glib,ieei/glib,lukasz-skalski/glib,johne53/MB3Glib,cention-sany/glib,djdeath/glib,mzabaluev/glib,endlessm/glib,johne53/MB3Glib,lukasz-skalski/glib,endlessm/glib,cosimoc/glib,cention-sany/glib,djdeath/glib,mzabaluev/glib,gale320/glib,cosimoc/glib,MathieuDuponchelle/glib,Distrotech/glib,gale320/glib,tamaskenez/glib,krichter722/glib,Distrotech/glib,cosimoc/glib,ieei/glib,Distrotech/glib,cention-sany/glib,lukasz-skalski/glib,MathieuDuponchelle/glib,tamaskenez/glib,tchakabam/glib,endlessm/glib,endlessm/glib,cention-sany/glib,johne53/MB3Glib,Distrotech/glib,johne53/MB3Glib,djdeath/glib,krichter722/glib,tchakabam/glib,cosimoc/glib,endlessm/glib,cosimoc/glib,johne53/MB3Glib,ieei/glib,gale320/glib,MathieuDuponchelle/glib,tamaskenez/glib,lukasz-skalski/glib,mzabaluev/glib,ieei/glib,MathieuDuponchelle/glib,krichter722/glib,krichter722/glib,mzabaluev/glib,tchakabam/glib,tamaskenez/glib,ieei/glib,tamaskenez/glib,gale320/glib,cention-sany/glib,djdeath/glib,gale320/glib,lukasz-skalski/glib,tchakabam/glib,MathieuDuponchelle/glib,krichter722/glib,johne53/MB3Glib