Adds palette tracking

Pictotile now keeps track of palettes which have been used so new
palettes aren't introduced when, for example, a tile uses fewer colors
than previous tiles. This change does not support adding colors to more
limited palettes and so users should be advised to use "palette tiles".