Improve type inference for some LAPACK functions

I think there was also a logic bug here, since these functions accept StridedVecOrMat but would have returned a Matrix for non-Vector StridedVectors.

Related issues: #5560, #6822, #7060