Fixes#6346
The `AfterDamage` event has been replaced with `DamagingHit`, which
which happens for damaging moves after secondaries.
The `AfterHit` event has also been moved after `DamagingHit`, to make
sure Knock Off still procs after Rocky Helmet.
`AfterHit` is no longer a valid event on `secondary` and `self` blocks,
because it's meaningless in those blocks, anyway. All `self.onAfterHit`
and `secondary.onAfterHit` handlers have been moved to `onHit`, which
should have the same timing in practice.
The unwieldy system that is typesData is now removed, and is replaced by
the array `types` and the string `addedType`, which track the same amount
of information in a much more efficient way. (Roost is now hardcoded, but
let's not talk about that.)
Incidentally, this now roughly matches client, which tracks typechange
and typeadd as volatiles.
This allows us to remove ModifyPokemon, which overall provides a 10%
performance increase. I was hoping it'd be more substantial, but oh well.