Fixed "leaking" that occurred when the component that was extended was removed/detached

When are component was extended that was removed later in the process (e.g. a window) the client side kept sending events to the server. With this fix the event handler is removed when the extension gets unregistered and no more events will be send to the server from zombie extensions.