Terrain/imagery cleanup

Some minor cleanup and tweaks to the terrain/imagery system, from the `oneTexturePerLayer` branch.

The most significant change here is to use the `Context` cache to store objects needed for imagery reprojection rather than holding a separate copy per layer.