Add preliminary quaternion stuff, imported from ahrs repo.