Added unique id to tilesets in .tiles files.  Plus other changes.

When a tileset is added to a .tiles file for the first time, it is assigned
a unique ID starting from 1.

.tiles files now have a 'tdef' signature (the first 4 bytes) followed by
a 32-bit signed integer version number.

Fixed not updating TileDefTileset size to match the current tileset image
size.  This broke when I allowed the tileset directory to be different than
the .tiles directory.

If the user chooses a new tileset directory for a .tiles file, make sure the
TileDefTilesets are resized as needed.

Put up a dialog when tileset images changed size, to warn the user that they
might lose properties when tilesets get smaller.