Merge pull request #189 from bbandix/enginiomodel

Enginiomodel fixes
Initial websocket notifications experiment

Add EnginioBackendConnection which implements a minimally needed
WebSocket protocol to be able to read incoming messages from a
specified backend.

Add a test to set up a backend and test if we receive all the
notifications about the changes.
The backend has to be set up with the additional option:

settings: {
    websocket: true  # this enables websocket notifications
}

This currently only works with the staging server.
Make EnginioBackendConnection aware of close status

Add WebSocketCloseStatus and handle close messages from
the server as a first step for closing handshake.
For now we only print the closing status for debugging purposes.
Implement closing handshake for WebSocket protocol

This patch adds frame header construction and client-to-server
payload masking support to the WebSocket implementation which
makes it possible to send messages to the server.
Implement closing handshake to properly close the connection
with the server and add more tests to increase the test coverage.
Fix warnings about string literals in EnginioBackendConnection.
Fix WebSocket key generation and move it to a static member

The key can be used as a unique key later for end-to-end identification
of requests, and to filter out notifications caused by own REST API calls.
We should not create a human readable key, since it is 32 byte, but rather
generate an RFC4122 compilant 16 byte nonce as the WebSocket standard says.
Also change the masking key generation to use the first 4 bytes of a newly
generated binary UUID instead of using the beginning of the WebSocket key.