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.

fixes #1191 
Ok, I got the meaning of this, but shouldn't current() return NEXT element if current element is unset?