[Accel/Mag Cal] Ensures sqrtf(X), only for X > 0

This CL syncs a change from Google3 runtime accelerometer
and magnetometer calibration code to ensure that sqrt() is
only called for non-negative numbers.

Tip of G3 CL: 168477539
Bug: 65559982
Test: Built and verified on hardware.

Change-Id: Idb182a84d69982a3351fe5cea444f5b77716f471
3 files changed