Simplify implementation of centralize_sumabs2

This is not only a bit shorter but also a bit faster, likely due to the partially unrolled summation.

Also fix a bounds violation when computing the variance of a vector with a single element. (The caller did not actually ensure `length >= 2`.)

cc @lindahua