Initialize Winsock API using INITIALIZE_ONCE

fixes #7413
Implement platform-independent wrapper for poll()