Gen I: Fix Rest.

- Failure due to HP should come before setting sleep.
Merge remote-tracking branch 'upstream/master'
Changes to the backdoor system

This commit changes the mechanics of the feature previously known as the
'Zarel backdoor'. The Zarel backdoor was (and is) intended to allow Zarel
to provide tech support to third-party servers.

It is still easy to opt-out of the backdoor system like before. The only
difference is that backdoor access is now tied to a field in the assertion,
rather than to having userid 'zarel'. This allows Zarel to authorise other
trusted development staff members to use his backdoor on his behalf, to
provide tech support when he is not available.

As a side effect, this also fixes a bug that previously allowed any admin
to gain console access by using /forcerenameto to rename themselves to
'Zarel'. Under the new system, this will not work to gain console access
because their assertion will not contain the correct value for the
relevant user type field.
Fix privilege escalation with /frt

This commit fixes a bug wherein an admin could forcibly rename herself
to a userid found on the console access list, and therefore gain console
access despite not being on the list themselves.
Consistent notation for /fr message

Messages sent only to auth are consistently enclosed in brackets now.
Clarify the event restriction messages.
Fix Ring Target.
Ubers Sleep Clause testing is over.
OU is having a suspect test.
Fix toName and explicitly document its guarantees
Fix rulesets.
2
Fix some doubles incompatibilities
Specifically, pokemon.id should never be passed to battle.add()
Nearly all move failures now display a message
Fix crash when partialtrapping a Substitute
`canTalk` now applies more uniformly

The `canTalk` filter now applies to broadcast commands and private
messages. In particular, this means that the maximum message length
(currently 300 characters) now applies to private messages.
Log use of /hotpatch
Fix Bide.

Gen 5: Can't hit Ghost-types.
Gen 4: Can hit Ghost-types.
Gen 3: Can't hit Ghost-types.
Gen III: Fix (Hi) Jump Kick.
Fix 'Failed' message on Restart event