Partial send handling

AG removed what looked like redundant set eff_buf.token_len <- n
clean partial send handling warning

Reported-by: Michael Haberler <mail17@mah.priv.at>
Signed-off-by: Andy Green <andy.green@linaro.org>
Added new HTTP headers and WSI tokens:

 - "access-control-request-headers:" <-- WSI_TOKEN_HTTP_AC_REQUEST_HEADERS
 - "if-none-match:" <-- WSI_TOKEN_HTTP_IF_NONE_MATCH
Added comma after if-none-match...
Added HTTP_STATUS_NO_CONTENT == 204
Added optional per-header length limits:

 - libwebsockets.h:
 - * added struct lws_token_limits
   * added token limits pointer to lws_context_creation_info
 - private-libwebsockets.h: added token limits pointer to lws_context_creation_info
 - context.c: copy token limits in create_context
 - client.c / server.c: pass context when invoking libwebsocket_parse
 - parsers.c:
 - * libwebsocket_parse takes context pointer
   * issue_char takes context pointer and checks header length against context limits, if defined
   * issue_char returns 1 (not -1/0) for header too long, and spill: sets the state to WSI_TOKEN_SKIPPING
Added docs for token limits.
Reducing CPU cycles spent calculating per-header length limit.
Added HTTP OPTIONS support:

     - added options to minilex.c
     - regenerated lextable.h
     - added WSI_TOKEN_OPTIONS_URI to libwebsockets.h
     - tweaked parsers.c to accommodate OPTIONS token
     - tweaked server.c to set uri_ptr and uri_len for HTTP callback on OPTIONS as well
fix build on OpenBSD
dont free externally allocated user_space when closing connection

Signed-off-by: Andy Green <andy.green@linaro.org>
partial send handling
fix confusion ull in latency reporting
add runtime context flag to enforce defeat of OS CA CERTS even if build option selected

Signed-off-by: Andy Green <andy.green@linaro.org>
Trac 75: fix uxexpected ssl connection close
test server dumb increment fix once per second duplicate

Signed-off-by: Andy Green <andy.green@linaro.org>
update changelog for 1.3

Signed-off-by: Andy Green <andy.green@linaro.org>
libwebsockets_read: update 'len' after lws_handshake_server invocation
HTTP Version, Keep-alive support, No-copy POST

This is a squashed commit from https://github.com/andrew-canaday/libwebsockets,
dev/http_keepalive branch (strategies changed a few times, so the commit
history is clutteread). This branch is submitted for clarity, but the other
can be used as a reference or alternative.

 * added **enum http_version** to track HTTP/1.0 vs HTTP/1.1 requests
 * added **enum http_connection_type** to track keep-alive vs close
 * replaced content_length_seen and body_index with **content_remain**
 * removed **post_buffer** (see handshake.c modifications)

 * removed post_buffer free

 * switch state to WSI_TOKEN_SKIPPING after URI is complete to store version
 * delete *spill* label (unused)

 * add vars to track HTTP version and connection type
 * HTTP version defaults to 1.0
 * connection type defaults to 'close' for 1.0, keep-alive for 1.1
 * additional checks in **cleanup:** label:
   * if HTTP version string is present and valid, set enum val appropriately
   * override connection default with the "Connection:" header, if present
 * set state to WSI_STATE_HTTP_BODY if content_length > 0
 * return 0 on HTTP requests, unless LWS_CALLBACK_HTTP indicates otherwise

 * add vars to track remaining content_length and body chunk size
 * re-arrange switch case order to facilitate creation of jump-table
 * added new labels:
   * **read_ok**: normal location reach on break from switch; just return 0
   * **http_complete**: check for keep-alive + init state, mode, hdr table
   * **http_new**: jump location for keep-alive when http_complete sees len>0
 * after libwebsocket_parse, jump to one of those labels based on state
 * POST body handling:
   * don't bother iterating over input byte-by-byte or using memcpy
   * just pass the relevant portion of the context->service_buffer to callback
Don't need 'content_remain' in libwebsocket_read