change context creation params to struct

*** This patch changes an API all apps use ***

Context creation parameters are getting a bit out of control, this
patch creates a struct to contain them.

All the test apps are updated accordingly.

Signed-off-by: Andy Green <andy.green@linaro.org>
diff --git a/libwebsockets-api-doc.html b/libwebsockets-api-doc.html
index c7129c7..65a3da7 100644
--- a/libwebsockets-api-doc.html
+++ b/libwebsockets-api-doc.html
@@ -344,57 +344,15 @@
 <h2>libwebsocket_create_context - Create the websocket handler</h2>
 <i>struct libwebsocket_context *</i>
 <b>libwebsocket_create_context</b>
-(<i>int</i> <b>port</b>,
-<i>const char *</i> <b>interf</b>,
-<i>struct libwebsocket_protocols *</i> <b>protocols</b>,
-<i>struct libwebsocket_extension *</i> <b>extensions</b>,
-<i>const char *</i> <b>ssl_cert_filepath</b>,
-<i>const char *</i> <b>ssl_private_key_filepath</b>,
-<i>const char *</i> <b>ssl_ca_filepath</b>,
-<i>int</i> <b>gid</b>,
-<i>int</i> <b>uid</b>,
-<i>unsigned int</i> <b>options</b>,
-<i>void *</i> <b>user</b>)
+(<i>struct lws_context_creation_info *</i> <b>info</b>)
 <h3>Arguments</h3>
 <dl>
-<dt><b>port</b>
-<dd>Port to listen on... you can use 0 to suppress listening on
-any port, that's what you want if you are not running a
-websocket server at all but just using it as a client
-<dt><b>interf</b>
-<dd>NULL to bind the listen socket to all interfaces, or the
-interface name, eg, "eth2"
-<dt><b>protocols</b>
-<dd>Array of structures listing supported protocols and a protocol-
-specific callback for each one.  The list is ended with an
-entry that has a NULL callback pointer.
-It's not const because we write the owning_server member
-<dt><b>extensions</b>
-<dd>NULL or array of libwebsocket_extension structs listing the
-extensions this context supports.  If you configured with
---without-extensions, you should give NULL here.
-<dt><b>ssl_cert_filepath</b>
-<dd>If libwebsockets was compiled to use ssl, and you want
-to listen using SSL, set to the filepath to fetch the
-server cert from, otherwise NULL for unencrypted
-<dt><b>ssl_private_key_filepath</b>
-<dd>filepath to private key if wanting SSL mode,
-else ignored
-<dt><b>ssl_ca_filepath</b>
-<dd>CA certificate filepath or NULL
-<dt><b>gid</b>
-<dd>group id to change to after setting listen socket, or -1.
-<dt><b>uid</b>
-<dd>user id to change to after setting listen socket, or -1.
-<dt><b>options</b>
-<dd>0, or LWS_SERVER_OPTION_DEFEAT_CLIENT_MASK
-<dt><b>user</b>
-<dd>optional user pointer that can be recovered via the context
-pointer using libwebsocket_context_user 
+<dt><b>info</b>
+<dd>pointer to struct with parameters
 </dl>
 <h3>Description</h3>
 <blockquote>
-This function creates the listening socket and takes care
+This function creates the listening socket (if serving) and takes care
 of all initialization in one step.
 <p>
 After initialization, it returns a struct libwebsocket_context * that
@@ -997,3 +955,55 @@
 all sessions, etc, if it wants
 </dl>
 <hr>
+<h2>struct lws_context_creation_info - </h2>
+<b>struct lws_context_creation_info</b> {<br>
+&nbsp; &nbsp; <i>int</i> <b>port</b>;<br>
+&nbsp; &nbsp; <i>const char *</i> <b>interface</b>;<br>
+&nbsp; &nbsp; <i>struct libwebsocket_protocols *</i> <b>protocols</b>;<br>
+&nbsp; &nbsp; <i>struct libwebsocket_extension *</i> <b>extensions</b>;<br>
+&nbsp; &nbsp; <i>const char *</i> <b>ssl_cert_filepath</b>;<br>
+&nbsp; &nbsp; <i>const char *</i> <b>ssl_private_key_filepath</b>;<br>
+&nbsp; &nbsp; <i>const char *</i> <b>ssl_ca_filepath</b>;<br>
+&nbsp; &nbsp; <i>int</i> <b>gid</b>;<br>
+&nbsp; &nbsp; <i>int</i> <b>uid</b>;<br>
+&nbsp; &nbsp; <i>unsigned int</i> <b>options</b>;<br>
+&nbsp; &nbsp; <i>void *</i> <b>user</b>;<br>
+};<br>
+<h3>Members</h3>
+<dl>
+<dt><b>port</b>
+<dd>Port to listen on... you can use 0 to suppress listening on
+any port, that's what you want if you are not running a
+websocket server at all but just using it as a client
+<dt><b>interface</b>
+<dd>NULL to bind the listen socket to all interfaces, or the
+interface name, eg, "eth2"
+<dt><b>protocols</b>
+<dd>Array of structures listing supported protocols and a protocol-
+specific callback for each one.  The list is ended with an
+entry that has a NULL callback pointer.
+It's not const because we write the owning_server member
+<dt><b>extensions</b>
+<dd>NULL or array of libwebsocket_extension structs listing the
+extensions this context supports.  If you configured with
+--without-extensions, you should give NULL here.
+<dt><b>ssl_cert_filepath</b>
+<dd>If libwebsockets was compiled to use ssl, and you want
+to listen using SSL, set to the filepath to fetch the
+server cert from, otherwise NULL for unencrypted
+<dt><b>ssl_private_key_filepath</b>
+<dd>filepath to private key if wanting SSL mode,
+else ignored
+<dt><b>ssl_ca_filepath</b>
+<dd>CA certificate filepath or NULL
+<dt><b>gid</b>
+<dd>group id to change to after setting listen socket, or -1.
+<dt><b>uid</b>
+<dd>user id to change to after setting listen socket, or -1.
+<dt><b>options</b>
+<dd>0, or LWS_SERVER_OPTION_DEFEAT_CLIENT_MASK
+<dt><b>user</b>
+<dd>optional user pointer that can be recovered via the context
+pointer using libwebsocket_context_user
+</dl>
+<hr>