Fix Gdal driver to use fast subsampling to create elevation layers.

Fixes problems with gaps between tiles when using the faster createHeightField() path. Also modified to make sure gdal samples on tile boundaries when the target buffer is less than the source size so that tile edges match. Changes are commented to explain what I have done.

Quite a few whitespace changes in this - sorry!

There are also some changes to the old slower path to improve disk cache hits. These can be ignored if you prefer.

I also reduced the size of the target buffer for speed. Doesn't seam to have any detrimental affects. Maybe this could be an option?