gsocket: Set SO_NOSIGPIPE on sockets on Darwin
gsocket: Set SO_NOSIGPIPE on sockets on Darwin

This is a best-effort approach to preventing SIGPIPE emissions on Darwin
and iOS, where they continue to be intercepted by the Xcode debugger
even if SIG_IGN prevents them crashing the program.

This is similar to the existing code which sets MSG_NOSIGNAL on all
send() calls. MSG_NOSIGNAL doesn't exist on Darwin though.

Based on a patch from Philip Withnall.

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

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