Fixed some weak parts.

Fixed some issues from Clang static analyzer
Merge branch 'master' into mongodb
Merge branch 'mongodb' of github.com:verse/verse into mongodb
Small refactoring
Better error messages in Python verse module.

Signed-off-by: Jiri Hnidek <jiri.hnidek@tul.cz>
CMake prints used generator.
WIP: store SHA1 hashes of passwords

- Only small part of server side is ready
- It is not used by client at this time
- It is not negotiated
It is possible to store SHA1 hashes of password in CSV file.

 - It is more secure than password in plaintext.
 - You can create SHA1 hash with openssl command line tool:
    $ echo -n "my_secret_pass" | openssl dgst -sha1
 - CSV file has to have different header:
   username,passhash,UID,real name
 - TODO:
   - add support for other hashes (md5, sha256, sha512)
   - better format and parsing of CSV header
Better ifdef of OpenSSL.
Better reading of CSV file.

- Verse server is not able to read CSV file with hashes of passwords,
when it is not compiled with support of OpenSSL
- Better error messages, when header of CSV file is wrong.
Fixed stupid bug in ifdef.
refaktoring of example/index.html to javascript app
Merge pull request #6 from verse/javascript

Javascript - refactoring of example/index.html to javascript modules
Merge remote branch 'upstream/master'
* WebSocket bug fix in verse server (header Sec-WebSocket-Protocol).

 - Verse server didn't send response to client with header
   Sec-WebSocket-Protocol: v1.verse.tul.cz
 - More debug print

Signed-off-by: Jiri Hnidek <jiri.hnidek@tul.cz>
* Bug fix: verse server didn't sent Sec-WebSocket-Protocol in HTTP response.

 - Server accepts only Sec-WebSocket-Protocol: v1.verse.tul.cz
 - Server sends Sec-WebSocket-Protocol: v1.verse.tul.cz in response to client too
 - Improved debug prints
 - Small refactoring
Small refactoring.

Signed-off-by: Jiri Hnidek <jiri.hnidek@tul.cz>
* Small refactoring of WebSocket implementation.

Signed-off-by: Jiri Hnidek <jiri.hnidek@tul.cz>
Bug fix: prevents verse_server for load 1, when WebSocket is used.
 
 - It is neccessary to set read/write set of socket descriptors only
   in situation, when WSLay has something to receive/send.
 - Small refactoring
 - More debug prints.

Signed-off-by: Jiri Hnidek <jiri.hnidek@tul.cz>
Close webSocket connection, when handshake timed-out/ wrong command is received.

 - Connection with WebSocket is closed in friendly way, when WebSocket
   client does not finish handshake within 30 seconds.
 - When wrong command is received, then connection is closed too.
 - Added some more debug prints.