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.
Merge pull request #3734 from charris/backport-1.8-3723

Backport 1.8 3723