Gen 2: Correct sandstorm damage

Sandstorm damage is the double in gen 2.
make /privateroom more general. allow different privateroom settings
Gens 1 & 2: Refactor secondary status effects.
After a review of the disassembled code of gens 1 and 2, we've come to realise some very important stuff regarding secondary status.
On gens 1 and 2, Fire-types are not inherently immune to burn.
Ice-types are neither inherently immune to ice.
On gen 1, secondary status effects for paralyse, burn, and freeze will be ignored if the target Pokémon shares a type with the move-type.
On gen 2, the same happens but only for burn and freeze.
Poison-types are actually immune to poisons.
On gen 2, tri-attack can burn fire-types and freeze ice-types.
On gen 1, body slam cannot paralyse normal-types.
Also, Lick cannot paralyse ghost-types.
And thunderbolt/thunder can't paralyse electric-types.
Gen 1: Update Psychic's secondary chance

It's closer to 33% than to 30%.
This is a temporary fix until I move all secondary effects to their chance over 255 like it is on the cartridge.
Merge pull request #1382 from codelegend/privaterooms

make /privateroom more general, allow multiple privateroom settings.
Gen 1: Fix faint mechanics with two turn moves
End events were not being called as queue was being emptied too soon.
Reverting with this commit part of commit 85994c45d8005164c3e26a083c047648759f2225, as turn is properly ended on gen 1 modded's faint function.
Turn still ends after a faint properly, statuses (like psn) do not drop health from surviving Explosion targets.
Gens 1 & 2: Fix bug with substitute on <25% hp

An improper check caused damage on substitutes when the user had <=25%hp to be lowered.
Merge branch 'master' of https://github.com/codelegend/Pokemon-Showdown into pokelegends