Small dangling pointer tweak/fix to CCEventDispatcher
If cleaning a target node that has a listener in the 'to be added' listeners list then ensure that listener does not have a stale reference to the node. This is a minor tweak in addition to pull request 6160 (https://github.com/cocos2d/cocos2d-x/pull/6160).
Tweak formatting and change spaces to tabs so indentation appears consistent on github.
Merge pull request #6177 from DarraghCoy/small_dangling_ptr_fix

Small dangling ptr fix to EventDispatcher::removeEventListenersForTarget