A more robust error bound for the determinant.

The old test for the determinant has caused a lot of trouble. The new test depends on the condition number of the matrix and should therefore work for arbitrary matrices.

I would appreciate if someone with a 32 bit machine could try this out.

Related: #5605, #5874