Summary:- Get rid of no longer necessary WebSocket.js v WebSocketBase.js split
- Use `EventTarget(list, of, events)` as base class to auto-generate `oneventname` getters/setters that get invoked along with other event handlers
- Type annotation `any` considered harmful, especially when we can easily spell out the actual type
- Throw in some `const` goodness for free
**Test Plan:** Launch UIExplorer example app, supplied `websocket_test_server` script, and try different combinations of sending and receiving text and binary data on both iOS and Android.
Closes https://github.com/facebook/react-native/pull/6889
Differential Revision: D3184835
Pulled By: mkonicek
fb-gh-sync-id: f21707f4e97aa5a79847f5157e0a9f132a1a01cd
fbshipit-source-id: f21707f4e97aa5a79847f5157e0a9f132a1a01cd
Summary: This fixes a leak in regards to web sockets, detailed in #3846 . The connection state constants referenced the class rather than the instance and were coming back undefined.
cc brentvatne stephenelliot
Closes https://github.com/facebook/react-native/pull/3896
Reviewed By: svcscm
Differential Revision: D2626399
Pulled By: vjeux
fb-gh-sync-id: f42670003b68ed5b86f078d7ed74c2695f30fc69