Redo / refactor affine and rot-zoom least squares

Use a simpler least-squares function for affine and rotzoom
model estimation, instead of computing the pseudo inverse.
Also refactors the code into a separate mathutils.h file.

The SVD code is currently used only for estimation of the
homography models which can be removed when we remove the
homography models.

Coding efficiency change is in noise range, with the small
difference coming from numerical precision issues.

Change-Id: I0a9eb79495911cea21a7945b397d596e22a2a186
4 files changed