fixed "chat window closes main window" bug

Renamed TRAY_EVENT to HIDE_EVENT. Chat window is not closable=False and
listens for HIDE_EVENT to hide itself. This prevents the bug when
minimised main window was killed while closing chat window.