Remove OpenSSL dependency, compile as static library as well

Took SHA1 from RFC 3174
http://tools.ietf.org/html/rfc3174

The WebSocket handshake requires a lot of stuff.

Examples are now compiled with static library so they can be run
without having to set LD_LIBRARY_PATH.