Optimize UDDF export

Writing the samples/waypoints to UDDF export in a totally new way.
Previously the preparations for approximating waypoints was done for
every sample, now only for the events.

A few days ago it took 36 seconds for my test set of 8 dives to export
to UDDF.  This optimization round took it down from 0m4.745s to
0m0.253s.

Fixes #508

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Add conditional so globe.cpp builds with older versions of Marble

In commit 7f3b487c77c7 ("Restore the previous globe zoom level after
showing dive without GPS") I was a bit too aggressive in replacing a
deprecated API function - people still need to be able to compile against
Marble versions older than 4.10.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>