introduce win32 build capability

This adds win32 build compatability to libwebsockets.

The patch is from Peter Hinz, Andy Green has cleaned it up a bit and
possibly broken win32 compatability since I can't test it, so there
may be followup patches.  It compiles fine under Linux after this
patch anyway.

Much of the patch is changing a reserved keyword for Visual C compiler
"this" to "context", but there is no real C99 support in the MSFT
compiler even though it is 2011 so C99 style array declarations
have been mangled back into "ancient C" style.

Some windows-isms are also added like closesocket() but these are
quite localized.  Win32 random is just using C library random() call
at the moment vs Linux /dev/urandom.  canonical hostname detection is
broken in win32 at the moment.

Signed-off-by: Peter Hinz <cerebusrc@gmail.com>
Signed-off-by: Andy Green <andy@warmcat.com>
diff --git a/test-server/test-client.c b/test-server/test-client.c
index 09528c2..c1abff7 100644
--- a/test-server/test-client.c
+++ b/test-server/test-client.c
@@ -26,7 +26,6 @@
 #include <string.h>
 
 #include "../lib/libwebsockets.h"
-#include <poll.h>
 
 static unsigned int opts;
 static int was_closed;
@@ -147,17 +146,20 @@
 /* list of supported protocols and callbacks */
 
 static struct libwebsocket_protocols protocols[] = {
-
-	[PROTOCOL_DUMB_INCREMENT] = {
-		.name = "dumb-increment-protocol",
-		.callback = callback_dumb_increment,
+	{
+		"dumb-increment-protocol",
+		callback_dumb_increment,
+		0,
 	},
-	[PROTOCOL_LWS_MIRROR] = {
-		.name = "lws-mirror-protocol",
-		.callback = callback_lws_mirror,
+	{
+		"lws-mirror-protocol",
+		callback_lws_mirror,
+		0,
 	},
-	[DEMO_PROTOCOL_COUNT] = {  /* end of list */
-		.callback = NULL
+	{  /* end of list */
+		NULL,
+		NULL,
+		0
 	}
 };