Corrected OpenLayers code to reflect fix to geodetic resolution factor.

The openlayers generation code subtracted 1 from the server zoom level in order to account for the resolution it was using (0.703125) which should be 1.40625.  This was caused the javascript code to sometimes request TMS tiles with invalid zoom levels (-1) in cases where the map was fully zoomed out.  With this fix, the geodetic openlayers code now more closely follows the same logic as the openlayers code for the mercator profile.

From: Steven D. Lander <steven.lander@rgi-corp.com>

git-svn-id: https://svn.osgeo.org/gdal/trunk/gdal@26164 f0d54148-0727-0410-94bb-9a71ac55c965
Fixed geodetic tile calculation and cleaned up code.

The geodetic profile was creating tile caches with a resolution factor of 0.703125, instead of the standard for TMS geodetic tiles which is 1.40625.  This error broke tile numbering for subsequent zoom levels.

Additionally, refactored code within the geodetic object for better maintainability.

From: Steven D. Lander <steven.lander@rgi-corp.com>

git-svn-id: https://svn.osgeo.org/gdal/trunk/gdal@26165 f0d54148-0727-0410-94bb-9a71ac55c965