PathSolvers/Dijkstra: optimise Clear() and RestartQueue()

Don't pop all the queue items in order; instead, clear the whole
container in one call.  As a side effect, this works around the
pedantic debug check in libstdc++ that can make XCSoar crash.
Route/AStar: use reservable_priority_queue::clear()

Fixes TRAC #3035 (abort with the debug build).
CompareProjection: rename SimpleSquareDistance()

.. to SimpleDistance() - this function doesn't return a square!
CompareProjection: don't divide by square width

This formula isn't about squares; see previous commit.  This fixes
"fixed" underflows causing assertion failure (debug mode) and reduces
CPU usage of the airspace/topography renderer by reusing cached
buffers more often.
Android/InternalGPS: use variable locationProvider
Android/InternalGPS: check if GPS is present before checking enabled

New workaround for the Nook Simple Touch crash: upon calling
LocationManager.isProviderEnabled("gps"), the LocationManagerService
crashes with "java.lang.IllegalArgumentException: provider=gps".  This
patch adds a LocationManager.getProvider("gps")!=null check which
appears to be safe.  (Preparing for TRAC #2999)
Device/Descriptor: allow opening Android's internal GPS on Nook

The Android crash workaround has been moved to InternalGPS.java, and
now we can remove the check from native class DeviceDescriptor.  This
allows using mock locations on the Nook (TRAC #2999).
Profile/Earth.cpp: fix bug reading geopoints in New Zealand

When longitude was > 90 or less than <-90 it would not load
Geopoint from profile
FlatEllipse: add assertion on NaN
Task/MatPoints: use the std::vector::erase() result

Fixes glibcxx error "attempt to compare a singular iterator to a
past-the-end iterator".
Form/TabMenu: add method GetButtonPosition()
TabMenu: add MenuTabIndex::operator!=()
Form/TabMenuDisplay: reduce flickering on Windows

If it's just about flashing one button, repaint only that button.
release v6.6.5
Merge tag 'v6.6.5' into v6.6.x

Conflicts:
	NEWS.txt