Pass spec gethostbyname cleanly.

* rakelib/platform.rake:
  Add new structure `sockaddr_in6`
* lib/**/socket.rb :
  * Modify test to determine IP version. Use family
    instead of sockaddr string size.
  * Use platform configuration to determine offset and
    size of IP address in sockaddr string. `sockaddr_in`
    and `sockaddr_in6` platform structures are used for
    this purpose.