LogAnalyzer: add POSHOLD to TestPitchRollCoupling
AC_WPNav: add shift_wp_origin_to_current_pos for takeoff

This shifts the origin to the vehicle's current position and should be
called just before take-off to ensure there are no sudden roll or pitch
moves on takeoff.
Copter: shift pos targets to current location before takeoff
GCS_MAVLink: check target before erasing log
GCS_MAVLink: add comments around checking target
Plane: check target of set-mode request from GCS

Issue discovered and fix contributed by Deadolous
Rover: check target of set-mode request from GCS

Issue discovered and fix contributed by Deadolous
GCS_MAVLink: fixed log erase and log request end
GPS: fix SIRF set-binary message

This fixes an issue in which the the update rate for the mediatek, which
uses a similar protocol, was not being set correctly
AP_NavEKF : Fix bug in reset of position, height and velocity states

If the inertial solution velocity or position needs to be reset to the GPS or baro, the stored state history for the corresponding states should also be reset.
Otherwise the next GPS or baro measurement will be compared to an invalid previous state and will be rejected. This is particularly a problem if IMU saturation or timeout has occurred because the previous states could be out by a large amount
The position state should be reset to a GPS position corrected for velocity and measurement latency. This will make a noticeable difference for high speed flight vehicles, eg 11m at 50m/s.
AP_NavEKF : Fix bug in GPS innovation variance growth calculation

The uncertainty in acceleration is currently only scaled using horizontal accelerations, however during vertical plane aerobatics and high g pullups, misalignment in angles can cause significant horizontal acceleration error.
The scaling now uses the 3D acceleration vector length to better work during vertical plane high g maneouvres.
This error was found during flight testing with 8g pullups
AP_AHRS : Prevent EKF starting if GPS sats less than  AHRS_GPS_MINSATS
AP_NavEKF : Reduce weighting on GPS when not enough satellites

GPS measurement variance is doubled if only 5 satellites, and quadrupled if 4 or less.
The GPS glitch rejection thresholds remain the same
This will reduce the impact of GPS glitches on attitude.
AP_NavEKF : Explicitly initialise gpsNoiseScaler to default value
AP_NavEKF: simplify variable handling in EKF

use named state variables instead of states[] array where possible.
AP_NavEKF: make it clear that all sat counts are covered
Compass: use_for_yaw  to use primary compass health

This allows the internal compass to be used if the external compass
fails.
Compass: use_for_yaw for each compass
Compass_PX4: primary compass based on use_for_yaw
Compass_VRBrain: primary compass based on use_for_yaw