AP_GPS: check for corret GPS solution rates in flight and fix

if the GPS is giving us data at less than 300ms intervals then re-send
the configuration messages to try to kick it into the right rates

Pair-Programmed-With: Randy Mackay <rmackay9@yahoo.com>
AP_Math: cope with large values passed into the wrap functions

this uses modulus if the function would loop too many times

Pair-Programmed-With: Randy Mackay <rmackay9@yahoo.com>
AP_Common: added OPTIMIZE() macro

this can be used to change the compiler optimization level of
individual functions

Pair-Programmed-With: Randy Mackay <rmackay9@yahoo.com>
AP_GPS: added UBLOX_FAKE_3DLOCK debugging option

useful when unable to get 3D lock
AP_GPS: update the UBLOX rates async from the start

this saves a bit of startup time
AP_HAL: require a buffer write() function in all ports

this makes a sufficient performance difference that it is worth it
HAL_AVR: implement an efficient buffer write() call for AVR

this saves some cycles in the telemetry code
HAL_SITL: implement a dummy buffered write
HAL_Empty: implement a dummy buffered write
HAL_FLYMAPLE: implement a dummy buffered write
HAL_Linux: implement a dummy console buffered write()
HAL_PX4: fixed build
HAL_AVR: mark some examples as not building
DataFlash: wait for blocks to finish writing to flash on log read
DataFlash: fixed display of last page of flash logs
GCS_MAVLink: import latest upstream.

This add rally points.
AP_Common: Added RallyLocation struct.
Plane: Add support for rally points.

Added parameter RALLY_TOTAL.

Added handlers for new MAVLink messages RALLY_POINT and
RALLY_FETCH_POINT.

defines.h modified to make room in EEPROM to store rally points.

rally.pde added and is responsible for ensuring rally points get
stored in the correct spot in EEPROM.

Multiple Rally/RTL point support now done.  If rally points have
been defined, then when RTL mode is entered, the closest Rally
point is chosend and the plane loiters at that point.

Note only 10 rally points can be defined; this is to save space in
the APM's EEPROM.
AP_Common: pack the RallyLocation structure

so it can be written as a single binary block
AP_GPS: fixed warning