Fix logic for stretching imagery to the edge of terrain.

It wasn't correctly accounting for non-global imagery.
Merge remote-tracking branch 'origin/master' into fixImageryStretching
Remove unused variables.
Add tests.
Merge pull request #970 from AnalyticalGraphicsInc/fixImageryStretching

Fix logic for stretching imagery to the edge of terrain.