move WSAStartup to init

WSAStartup should be called before using any other socket functions. BindListenPort is not called if not listening, thus move it to init.

Closes #2585.