Overhaul Terrain Sandcastle example.

Also add support for switching terrain providers on the fly.