merge revision(s) r45045,r45046,r45530: [Backport #9697]

	* ext/socket/ipsocket.c (ip_s_getaddress): Don't access freed memory.

	* ext/socket: Wrap struct addrinfo by struct rb_addrinfo.

	* ext/socket/socket.c (sock_s_getnameinfo): Save errno for EAI_SYSTEM.
	  Reported by Saravana kumar.  [ruby-core:61820] [Bug #9697]
	  Fixed by Heesob Park.  [ruby-core:61868]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_1@46054 b2dd03c8-39d4-4d8f-98ff-823fe69b080e