Automatic tile removal

The quadtree is now initialized with a memory limit, and tiles are deleted automatically if that limit is exceeded. The memory limit can also be set to 0 to prevent this behavior.