Implement challenge logging

Servers that change their configuration to do so can now log challenge battles.
Fix abilities crashing with confusion damage
Revert "Update Random Battle"

Don't remove Balloon Rotom-Fan without asking, that's just rude.
:|

This reverts commit fcaee2500971df71c1dd687991bbd68070384ebb.
Revert "Reject Rock Head with less than two recoil moves"

This reverts commit 4bc29710b404fb5f26c97c63ca42743e9dea43df.
Update Random Battle
Fix tracking of autolocked/autobanned userids
- `user.locked` would be equal to the id the user had when the rename has performed, rather than the autolocked userid.
- `lockedIps`'s property values would be sometimes wrong in a similar way due to a missing change in 47e90226.
Both of these issues are hereby fixed.
Merge branch 'master' of https://github.com/Zarel/Pokemon-Showdown