Fix No Guard missing against Pokemon in the middle of Fly/Dig/Dive/Shadow Force
Fix `selfdestruct` status moves
Better error messages for the learnset checker
Changes to logging & broadcasting of some commands

- /fr and /frt now behave as follows:

    1) Regardless of whether they are used in a battle or in the lobby,
       both commands show a message to all users in the lobby with the
       `receiveauthmessages` permission (which is % and up by default).

    2) If used in a battle, the message is also shown to all users in
       the battle, even if they are not auth. In addition, the message
       is written to the lobby file logs.

- use of /lockdown, /endlockdown, /kill, /crashfixed, and /crashnoted
  is now written to the lobby file logs (including the identity of the
  person who used the command)
Fix accidental introduction of global variable
Better documentation of /highlight
Implement /refreshpage command
Capitilize 'pokemon' in Sky Drop message
Support for config/formats.js
Better error messages in tools.js
Fix race conditions in writing logs/lastbattle.txt

This fixes two race conditions in writing lastbattle.txt:

1) Previously, there could be several calls to `fs.writeFile` on
   lastbattle.txt queued at the same time. The order these would run in
   was undefined, so lastbattle.txt did not necessarily represent the
   actual last battle at any given time.

2) Since `fs.writeFile` clears the file before writing to it, it
   was possible to end up with an empty lastbattle.txt if the process
   terminated while the call to `fs.writeFile` was being processed
   asynchronously. This commit fixes the issue by writing to a file
   named logs/lastbattle.txt.0 and then renaming that file to
   logs/lastbattle.txt. On POSIX, `rename` changes the target
   file's link to point to the soruce file (which is an atomic
   operation). Thus, this removes the possibility of ending up with
   an empty logs/lastbattle.txt on POSIX.

   Unfortunately, on Windows, `rename` will throw an error if the
   target file exists, which it will. In case of an error, this
   code still writes to logs/lastbattle.txt, but in a way that
   has a possibility of a race condition. As such, race conditions
   in writing to logs/lastbattle.txt are still possible on Windows, but
   they are fixed on POSIX at least.
Fix Gravity and Smack Down.
Report HP as pixels
Scripts can now override the Battle prototype
(well, pseudo-prototype, I've yet to refactor Battle to actually use
prototypes)
Adding Spring Forward format
Merge http://github.com/Zarel/Pokemon-Showdown
Merge http://github.com/Joimer/Pokemon-Showdown