Started redoing CMake support based on the up to date repos
Some more Cmake stuff.
CMake support + fixed windows build.
- Finalized CMake support (tested on windows only so far).
  - Uses a generated lws_config.h that is included in
  private-libwebsocket to pass defines, only used if CMAKE_BUILD is set.
  - Support for SSL on Windows.
  - Initial support for CyaSSL replacement of OpenSSL (This has been added
    to my older CMake-fork but haven't been tested on this version yet).
- Fixed windows build (see below for details).
- Fixed at least the 32-bit Debug build for the existing Visual Studio
  Project. (Not to keen fixing all the others when we have CMake support
  anyway (which can generate much better project files)...)
- BUGFIXES:
  - handshake.c
    - used C99 definition of handshake_0405 function
  - libwebsocket.c
    - syslog not available on windows, put in ifdefs.
    - Fixed previous known crash bug on Windows where WSAPoll in
      Ws2_32.dll would not be present, causing the poll function pointer
      being set to NULL.
    - Uninitialized variable context->listen_service_extraseen would
      result in stack overflow because of infinite recursion. Fixed by
      initializing in libwebsocket_create_context
    - SO_REUSADDR means something different on Windows compared to Unix.
    - Setting a socket to nonblocking is done differently on Windows.
      (This should probably broken out into a helper function instead)
    - lwsl_emit_syslog -> lwsl_emit_stderr on Windows.
  - private-libwebsocket.h
    - PATH_MAX is not available on Windows, define as MAX_PATH
    - Always define LWS_NO_DAEMONIZE on windows.
    - Don't define lws_latency as inline that does nothing. inline is not
      support by the Microsoft compiler, replaced with an empty define
      instead. (It's __inline in MSVC)
  - server.c
    - Fixed nonblock call on windows
  - test-ping.c
    - Don't use C99 features (Microsoft compiler does not support it).
    - Move non-win32 headers into ifdefs.
    - Skip use of sighandler on Windows.
  - test-server.c
    - ifdef syslog parts on Windows.
Fixed linux compilation and added more compile options.

- Tested and works on Linux now also, including SSL support.
- Look for ZLIB not zlib.
- Added CMake options for setting all LWS_ defines.
Fixed build on OSX.

- For some reason the "extern int pid_daemon" usage in libwebsockets.c would cause an "undefined symbols" linker error for the test-apps. This only happens with the CMake project, not the normal Makefiles. I have no clue why this is. Fixed it by getting the pid via a function instead.

- Added test-server-extpoll

- Renamed the library from libwebsocket -> libwebsockets
Added check for inline keyword availability.

Both to CMake project and Autoconf. inline will be defined to whatever inline replacement exists on the system, such as __inline or __inline__
Added support for CyaSSL replacement of OpenSSL.

http://www.yassl.com/yaSSL/Products-cyassl.html
- Small Size: 20-100kB
- Runtime Memory:  1-36kB
- 20X smaller than OpenSSL

So far only tested on Linux.

Note that this requires a bugfix in cyassl, otherwise it will crash. Pull request has been made to the official repos, in the meantime the following repos can be used: git://github.com/JoakimSoderberg/cyassl.git
Added some minor changes to CMake build file.

- Added options for compiling without server/client parts.
- Fixed a syntax error on printing an error on CyaSSL compilation.
- Don't compile server-extpoll either when the server isn't compiled.
Fixed windows build.

- Fixed the original visual studio project so that inline gets defined.
- Fix error in CMake with zlib.
Cleaned up the CyaSSL linking in the CMake project a bit.

Separated the CyaSSL linking and OpenSSL linking for more clearity.
Now tested on both OSX and Windows as well.
Fixed compilation on NetBSD.
add README

Signed-off-by: Andy Green <andy.green@linaro.org>