Socket functionality for WindowsPoller

Current state of the Windows port: all tests in common/ pass
Yeah try to avoid { } in switch statements. If you need local variables it's a sign it should be a method call anyway.