Don't allocate TEvent on the heap.

It is not necessary and it fixes various memory leaks.
Call cTelnet::disconnect() in Host's destructor.

This way, it is guaranteed to be called when a Host is destructed. This
also fixes a crash because disconnect uses things which are deleted before
cTelnet's destructor is called.
Fix crash when the window is closed before the settings dialog.