Correct IMU code to run packet integrity checks every update loop.

This way, the error flags are set even in Medulla IDLE state.
Specify counter type.
Resolve compiler warnings in medulla_imu.