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.
Update VGC 2015

Tornadus/Thundurus/Landorus with hidden ability can only be obtained
from gen 5 (BW2 Dream Radar) and thus can not have the pentagon.
Gen 1: Remove invulnerability glitches
Gen 2: Burn is dealt with on damage calculation
Gen 2: Fix phazing moves
Commit 15a0c241f5715d8547e62a6df2fc807def487751 forgot to revert the changes on 6e30b6a9ebbfab6562adefcd35d52865ff29e846.
Now they are implemented properly.
Gen 1: Update nomenclature
Update gen 1 code to use the same nomenclature as modern gen code.
This avoids confusion and makes it easier to read.
Fix Inverse's bad effectiveness calculation
Fix unsuccessful two-turn moves

Previously, if an invulnerable move's second turn was prevented from
executing, the user would remain invulnerable until the end of the turn.
Gen II: Light Ball only doubles Pikachu's Sp. Atk
Gens 1 & 2: Fix turn order
Since comparePriority is not on the Battle prototype and gen 1 and 2 mods reference it with this, it was not being used.
Side effect of 27be6a2a6548d53d77c8961e3b4237a0733ed68b