BatteryMonitor: add casts to make new compiler versions happy
Fix to mode switching

Added a call to zeroIntegralError() when switching from attitude to
stable mode. This fixes a problem where high gyro I term in rate mode
would cause the craft to lean one direction very hard when switching
modes (from attitude to rate).

Also added a couple things for compiling for STM32 on OS X.
Little rename
Delete unneeded files.