SREKF: changes to make it compile

Drop some unneeded includes.
trigonometry: make invSqrt C99 legal

The reinterpretation of a short as a long through casting
is not valid in C99. However, the same can be achieved
legally by creating a union of the two types and using
both interfaces.
task monitor: fix compilation for osx
relay_tuning: remove unused variable