AP_Math: bug fix to wrap_360 and wrap_180

angles above 720deg and below 3200deg might not have been properly
wrapped.
wrap_360_cd could return 36000 when really this should be wrapped back
to zero.