Mirrors the C# QRDecomposition::Solve overloads (vector and matrix right-hand sides).
a need not be square: an overdetermined system is solved in the least-squares sense; an
underdetermined system leaves the trailing ncol(a) - min(nrow(a), ncol(a)) unknowns at
zero (matching QRDecomposition.Solve's own truncated back-substitution, which only ever
fills indices below min(m, n)).