Fix more bugs with Protean
- Fix an issue introduced in 6539521adc, where Protean didn't activate if the target was immune to the move.
- Protean should not activate if the user fails a Detect/Protect, or the move is Fling or Natural Gift and the user has no item.
- Protean should not activate on the first turn of a Pledge Combo. Aditionally, fix Flash Fire/Storm Drain, etc being activated by the first move in the combo.
- Introduce event 'PrepareHit', which is ran after any move target is resolved but before immunity is checked.
Merge pull request #1079 from Slayer95/protean

Fix more bugs with Protean
Fix Sky Drop damaging the switch in if its original target faints
Fix Pledge moves waiting for fainted/inactive allies
Fix Eject Button interaction with Volt Switch/U-Turn
If a pokemon is switched out and in in the same turn, the move was not cancelled
Add triples center message
Make sure that switched out pokemon get their moves cancelled
There are several issues alike to the one fixed in 62611b926bc2daa07c55065ca26d7f02ca10e458
Update Triples formats

- Added Random Triples Battle
- Added Smogon Triples as challenge only
- Made XY Battle Spot Triples ladderable
Merge remote-tracking branch 'upstream/master'