Wrote absolute basic WebSocket parser as DuplexStream
finally got readable basement
improved helper functions and in-code doc
applied workaround for pushing back chunk to the socket

The approach before was to unshift chunk back to the socket so
that it can get reparsed the next time. This is always required
if our chunk is bigger than expected and contains the next frame
our we have an incomplete frame. Unfortunately it is not possible
for the source stream to remit readable when currently beeing read.
Because this MAY be a api issue I go the safe way and do a workaround
which uses recursive parsing through functions.
adding read tests for WebSocketStream

I am adding mocha tests for the WebSocketStream which
test if WebSocketStream does correct parsing this is
necessary to offer a higher quality and easier development.
frame state is now handled by FrameState prototype
implemented ability to write frames

You can now write your payload directly to an instance of WebSocketStream.
The head information are partly extracted from the payload (e.g. length) but
also from the flags defined in "wsstream.writeFrameState" like fin, mask, etc.
Currently we are missing body write tests (head tests are available).
completed stream tests and fixed bugs in writing
added writeHead method to WebSocketStream

The normal stream interface only handles writing the payload.
So it requires to know head information from somewhere else.
This is the "writeFrameState" object. With "writeHead(obj)"
we have a secure and neat access to it.
improved FrameState storage, code, tests

We swapped the FrameState class against two different:
FrameReadState and FrameWriteState. Also we updated the
tests to use the new "writeHead()" api. Also we improved
code in the parsing Frame part of WebSocketStream.
added explicit "wssocket.writeHead()" tests

These test check the behavior of "writeHead" (e.g. validation, auto flags).
Also I rewritten the structure of the write_head.js test to match the api better.
WebSocket can now read single byte streams
renamed "wssocket.socket" to "wssocket._source"
changed default flags and added "writeEnd()"

As default the fin flag is now false. You should use
"write(chunk)" to start beginning with a fragmented frame
stream and end it with "writeEnd(chunk)". Currently we are
missing the "wssocket" to use opcode 0x00 on continuation frames.
removed WebSocketFrame and old WebSocketSocket
wrote documentation for WebSocket stream
fixed module path in socket tests and renamed "fend" event to "done"
started to decouple frame parsing from stream

It is very hard to do fully test everything through the stream interface.
Also the code itself went very messy and I mixed up the parser with the stream.
I am now going to remove all parsing code from stream and put them into another
module "parser.js". There are "readHeadBytes", "writeHeadBytes" and
"calcHeadSize" for export. Implemention itself is finsihed but there are no
tests and no binding to "WebSocket" stream.
finalized parser test suite
writeHeadBytes now relays on state.length and Makefile supports test-parser