Update channel passing to use reference ids instead of stream ids

Necessary to achieve compatibility with other clients which are not using stream id directly.  This also fixes the binary encoding of the stream id values to always use 4 bytes for 32bit integer values allowing for easier integration than the default go binary varint encoding.

This changes makes docker/libchan and GraftJS/jschan compatible.

Relevant to #51