add LWS_CALLBACK_CLOSED_HTTP

Adds a callback to allow handling HTTP protocol connections
closing.

Signed-off-by: Andy Green <andy.green@linaro.org>
Declare "sha1_init" statically to avoid naming conflicts if linked statically with other libraries providing a method with the same name (e.g. OpenSSL).
Support empty ping and pong packets.
Added additional LWS_CALLBACK_CLOSED_HTTP callback to just_kill_connection branch of close_and_free_session
add CMake find function for libwebsockets

Signed-off-by: Jiri Hnidek <jiri.hnidek@tul.cz>
Request "send" not to trigger SIGPIPE on errors.
fix http incomplete send handling

Signed-off-by: David Gauchard <gauchard@laas.fr>
Merge branch 'master' of git://git.libwebsockets.org/libwebsockets
sync with upstream