Added manifold data structures to track a function value along with its
gradient in one place. Started using that code to simplify and clean up
the terrain generation code which is now supposed to be tracking
gradients.

-Peter Mawhorter