FrameBuffer based rendering

Did some work setting up a GLFrameBuffer for terrain rendering, so that
we can have proper outscattering. No longer relying on the fixed
pipeline depth buffer. Some refactoring.