Restore broken "close connection on tab close/reload"
Close connection when textarea is removed from document. Closes #7