Fixed #5042: Improve logic of CCLayer's setTouchEnabled