set readyState and propagate readyStateChange event

This is needed in order for [share-primus](https://github.com/aslakhellesoy/share-primus) to work with primus-multiplex.

Sorry about the unrelated whitespace changes! I blame it on the Atom editor.