AP_GPS: fixed GPS for Replay
AP_NavEKF : Updated GPS glitch protection logic

This adds new functionality to the detection and compensation of GPS
glitches:

1) A maximum allowable innovation is calculated using the GPS noise
parameter multiplied by the gate, with an additional component allowing
for growth in position uncertainty due to acceleration error since
the last valid measurement
2) Includes per vehicle type values for the acceleration error limit
3) If the innovation length exceeds the maximum allowable, no fusion occurs
4) If no fusion has occurred for long enough such that the position uncertainty
exceeds the maximum set by a per vehicle parameter or a maximum time, an offset
is applied to the GPS data to so that it matches the value predicted by the filter
5) The offset is never allowed to be bigger than 100m
6) The offset is decayed to zero at a rate of 1.0 m/s to allow GPS jumps to
be accommodated gradually
7) The default velocity innovation gate has been tightened up for copter and rover
8) The variance data logging output has been updated to make it more useful
Dataflash : Improved logging of EKF sensor health checks

This changes the definition sof the messages in the EKF4 message to make it more useful
The values shown now relate directly to how much margin there is before a measurement
is rejected, enabling better tuning of error trap parameters
Replay : Incorporate EKF4 flash logging updates
AP_Airspeed: changed sqrt() to sqrtf()
AP_NavEKF: use pythagorous2()
AP_Airspeed: use pythagorous3()
AC_WPNav: replace safe_sqrt with pythagorous2
AC_PosControl: replace safe_sqrt with pythagorous2
InertialNav: replace safe_sqrt with pythagorous2
AP_GPS: zero state structure on driver release

this ensures no values are left from the previous driver
AP_GPS: handle multiple GPS in GPS setHIL()
DataFlash: hdop is unsigned
Replay: handle multiple GPS sensors
Plane: update for GPS.setHIL() API
Rover: update for gps.setHIL() API
Copter: update for gps.setHIL() API
Sonar:  Added analog sonar support

Added sonar support using the AP_Rangfinder_analog class instead of the
Maxbotix class.  This brings to same as arduplane and ardurover.  This
class is much nicer because we can tweek sonar values through GCS
parameters.  Downside is now sonar selection is not trivial, may need to
implement simple config on GCS side or add a wiki for default settings
of most common analog sonars.
-Added enabled(bool) setter function to AP_Rangefinder_analog in order
to dynamically enable and disable sonar with chan7 or chan 8 options
-Added check to sonar health if sonar_alt - baro_alt < 10 meters to
prevent fly aways if sonar failed, or is covered up. **Not tested, needs
testing
-Added sonar_alt and sonar voltage reports to mavlink GCS, now displays
in mission planner correctly.
-User should set max_distance in parameters to appx 60% of max for
reliability reasons, because built in 60% check had to be removed.
-Added voltage report to CLI Test Sonar
-added option in apm_config.h to enable sonar tilt correction if one so
chooses to use this feature.

*Tested on Pixhawk, sonar pin 15 maxbotix MB1240XL, scale factor 2.42
*I don't this will fit on APM anymore?
Merge branch 'Sonar' of https://github.com/Supergoldfish/ardupilot into Sonar