Fixes 55
Merge pull request #54 from Artur-/master

Only call onopen after the connection has actually been opened
Fixes #47
Fix pushing from onOpen/onReopen with WebSockets (#48)

The webSocketOpened flag must be set before invoking _open(),
otherwise _pushWebSocket fails.
Clear _request.closed flag when (re)opening (#53)
Consider ArrayBufferView as binary type
From https://github.com/flowersinthesand/portal/issues/124