several waypoint bugfixes

bugfix: last waypoint was always set to VIA
bugfix: issue #7 (deletion of waypoints)
bugfix: moving waypoints up/down deleted waypoint-internal order