Use single set of arm/disarm code

Set mode and arm/disarm commands now call a single method to arm
disarm, thus removing code duplication. Also calls updated
arming_state_transition method such that the arming state logic does
not need to be duplicated outside of arming_state_transition.
arming_state_transition now outputs error messages

If mavlink fd is passed in method will output reason for arming failure
to mavlink.
Function naming and remove unneeded sprintf
geo lib: major rewrite of map_projection_XXX functions
Use updated map_projection_XXX functions in apps
mc_pos_control: operate in local projection instead of global frame
position_estimator_inav: mark local position as valid even if GPS not available (e.g. only FLOW)
geo lib: minor code style fix
vehicle_local_position: use double for ref_lat and ref_lon instead of int32, fix related apps
copyright and code style fixes
Merge branch 'beta_mavlink2' into mpc_local_pos_mavlink
Optical flow fixes
Merge branch 'master' into mpc_local_pos
Merge branch 'master' into mpc_local_pos
position_estimator_inav: use home position as local projection reference
'vehicle_global_position' topic updated: removed baro_alt and XXX_valid flags.
Simpler state transition code

Also fixed ARMING_STATE_ARMED_ERROR->ARMING_STATE_STANDBY_ERROR
transition.
Rewrote to provide better feedback

Also allows variables as well as static text for assert text in
ut_assert
Fixed bug with transition from in air restore to armed

Also added better debug output for invalid transitions
Update to convert to C++ style