Added socket functions and test script

Require stdlib; fixes #80

poll only returns active events in revents table, increases performance

Simplified lua_pushboolean() expression

Move require of std.list to correct place

Moved getaddrinfo() out of socket functions. getaddrinfo() is now exposed and returns a table with resolving results. connect(), bind() and sendto() now accept a table with family, port and addr fields

Cleaned up all other references to getaddrinfo

Added canonname + protocol fields in getaddrinfo() return table

Added tests-socket.lua

Added POSIX:2001 ifdefs for socket

Fixed error messages on sockaddr_from_lua