[keyserver] Track closed state in TunnelbrokerSocket
Summary:
This diff makes sure we don't respond to 'open' and 'close' events that come after a 'close' event. It mirrors code in lib/socket/socket.react.js.
We need this additional state so that in the on('open' block, we can differentiate the state prior to initialization to the state after closure.
Test Plan: I'm actually not sure how to reproduce an open or close event after a close event. Just adding this code because it was in the other class, and I don't think it will hurt
Reviewers: kamil
Reviewed By: kamil
Subscribers: tomek
Differential Revision: https://phab.comm.dev/D11391