move test programs to a separate folder
add error handling to poll()
improvements to closing sockets

 * avoids closing already closed sockets
 * adds a close() call to the socket destructor
allow caller to check if last recv() operation would block
add Socket::getError() method
update scons scripts