Fix #439: socket must be closed on __gc

This patch also adds argument checking to all socket methods.
Remove broken struct sockaddr definition from FFI

Fixes compatibility with third-party modules.
Hide box.socket.internal