Implement socket API
make Sockets test Java6-compilable, make it more generic, and move it to 'extra'