Fixed issue when socket was closed by server while connecting

If the socket connection is closed by the server while connecting
(meaning the connection establishment effectively failed but without an
error), the user wasnot be notified because the status is "Connecting"
and OnClosed will not fire the event in that case which gives the user
no chance to react to this event.
In this case the status must be changed to "Closing" (similar to
client_Error) to trigger the event.
Fixed wrong Origin header for RFC 6455

RFC 6455 does not use the Sec-WebSocket-Origin header like hybi10, but
the normal HTTP origin header. (see:
http://tools.ietf.org/html/rfc6455#section-1.2)
Merge pull request #11 from larskn/Fixes

Fixed two issues