Remove UB from Matrix.h, and replace by quiet NaNs.
This fixes a spurious failure reported by UBSan, and also be a step towards fixing the issue reported by @mclarsen: that floating point exceptions cause a halt of execution from some of our customers.