WP bugfixes

These are just the bugfixing commits from https://github.com/mavlink/qgroundcontrol/pull/446.