Switch win/share/*.c from hack.h to config.h plus miscellaenous
other headers. It's possible that there is conditional code that
didn't get exercised in my testing. The Unix Makefiles don't deal
with safeproc.c or tileset.c so I just compiled those without any
attempt to link.
set_tile_type frees tileset memory not in use for the current tile
type (paletted or full color).
stretch_tile and free_tile support resizing tiles at run time.
win/share/tileset.c seems only to be used by the MSDOS port, but it
compiles cleanly on OSX after these changes.
A file pointer was passed to fclose() twice, second time potentially
causing problems. There were cases of potentially null pointers
being passed to free() too. That should be safe these days, but it's
something we've tried to hard to avoid and would probably trigger
complaints from our own MONITOR_HEAP code if that ever got applied
here.