Rewriting Dixon's factorization method: matrix utilities.

Unittests included.