Fixed phase in diagMatrix

Before this fix the phase was chosen enforcing the sum of the elements
of each eigenvector to be positive (see dd4bd09bf).
This does not work well when the
sum is numerically close to zero for some symmetry. With this fix I
set the first non-zero element of each eigenvector to be positive.
Hopefully it is more robust and make results better reproducible
for regtesting
changelog
Decreased precision for regtests