lib.xcsoar.analysis: fix flight detection algorithm

Add some fallbacks for failed flight / scoring window detection
forms/upload.py: add pilot and co-pilot name
model.flight: move _ST_* classes to lib.sql
model.airspace: add extract_airspace method

Converts the stored height string into a int + reference string
using SI units
model.airspace: add get_airspace_infringements function
lib.xcsoar_.analysis: flight_path can be passed to analysis

Uploading a flight requires the flight path in several methods.
This allows us to share the data between those.
lib.xcsoar_.flightpath: add missing shortener
views.upload: share flightpath between methods
templates/macros/form.jinja: add error/help text to checkbox template
views.upload: ask for confirmation if any airspace penetrations were found

Hopefully prevent users to upload flights with unauthorized
airspace infringements.
mapserver: add mapserver basemap and mapproxy cache for osm + airspace
lib.sql: add query_to_sql method

Convert a sqlalchemy query to raw SQL
model.airspace: fix gathering of airspace infringement periods
templates/upload/details.jinja: render a nice airspace table
views.upload: create images of airspace intrusions