MAINT: Make the qr raw mode test independent of the LAPACK library.

The qr factorization is not unique and the values returned by the raw
mode may differ between LAPACK versions. Consequently, the results
cannot be checked against known values.

Closes #3703.