Register onopen callback on ws instance and emit 'open' event.
Fixed callback name.
Merge pull request #3 from ZauberNerd/master

Register onopen callback and emit 'open' event when connection is established.