move 'dirty' flag for Tilemap to a per-layer flag. Fixes #242