Remove event listeners on connection close. Fix for possible memory leak.