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.