Refactor ConstructedGeometry.

Move out procedural geometry construction into a separate class.
Use memory-safe data structures.
Release default materials and Tile in clearUnused.