Check for WS and null out references to it

- The javascript emitted appears to create self referencing
  event listeners that never get Garbage Collected in my browser.
  This ultimately ends up leaking memory and crashing my browser.
  The takeover chrome extension appears to use this node module
  and appears to manifest this problem
Merge remote-tracking branch 'origin/fix_reconnect_ws_leak' into unfux