Rename sanitisation and escaping functions

- `window.sanitize` is now `Tools.escapeHTML`
- `window.unsanitize` is now `Tools.unescapeHTML`
- `window.jsEscape` is now `Tools.escapeQuotes`
- `window.htmlSanitize' is now `Tools.sanitizeHTML`
- `battle.escape` has been eliminated and replaced by calls
   to `Tools.escapeHTML`
battledata no longer has config as a dependency
New search scripts
These scripts will eventually replace the old utilichart.js. For
now, they're only used in the pokedex.
battledata fixes:
- Tools.getMove no longer has graphics.js as a dependency
- Templates get an effectType
Eliminate various global variables
Add support for `upkeep` action to testclient.html
Fix uploading replays on showdown-80.psim.us
Correct fix for replay uploading on alternative ports
Eliminate almost all PHP from index.php
Load CSS from filesystem if curl doesn't work
Fix the preferred avatar feature
Validate battle/format IDs in replay uploading
More thorough replay upload validation
Add an error callback to battle.js
Templates always get name set correctly
Implement Tools.getType in client
Various bugfixes to new search library
Move custom name colours to config.js
psim.us configuration changes
Remove some defunct stuff from .htaccess