Fix the fitViewportToGeoShape calculation


The current implementation is calculating the bounding box of
a geocircle based on moving along a circle of latitude by the
distance of a circle's radius. Unfortunately the distances
on a small circle of a sphere are greater than great circle
distances. Reimplement the calculation using tangential
points between a geocircle and meridians.

Do not center the viewport in the center of the geoshape,
use the center of the bounding box instead.

Simplify zoom level adjustment calculations, use the reference
world plane to get rid of longitude wrapping and rounding
erros.

Finally update a viewport unit test, adjust the minimum map
size to 256x256, so fitToViewport calls have chance to succeed.
Fix out of order test execution.

Task-number: QTBUG-54337
Change-Id: I61726a4eb7183470c493ceb03d101f3a75305121
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
commitcd12d3c8eaf1c1a3dabfb50f88c635b9b1def3fc
parent04762a9eecafc80ebeb90c06258de551d451497f
authorMichal Klocek <michal.klocek@theqtcompany.com>
committerAlex Blasche <alexander.blasche@qt.io>
commit timeThu, 28 Jul 2016 08:08:04 +0000