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.