Add support for external palettes

External palettes are now generated with pal2js.py, and loaded before
the application code is loaded. Note that you won't be able to load
external palettes you've created, however, unless you use pal2js.py
to generate a new palettes.js that includes your custom palette.