Socket functionality for WindowsPoller

Current state of the Windows port: all tests in common/ pass
I don't think we normally bother with the extra curly brackets, @nomis52 ?