libraries/AP_Math/AP_Math.*
----------------------------
the macro "constrain(amt, low, high)" was replaced by the function
"float constrain(float, float, float)". 

In 81 of the 131 usages this macro constrained ints.
The introduction of the function caused unnecessary conversions from int
to float and then back to int.

Therefore the function was replaced by a templated one.

ALL 131 usages of the constrain function were replaced by the template
function with the correct type.