Fix for 1191 (detachEventHandler causing undefined index in CListIterator)

Modify CComponent to handle if an eventHandler has been removed while iterating over the event handlers