Fixed #5924: fixed a bug of cc.Component that its onExit isn't called.

fixed a bug of cc.Component that its onExit isn't called.