Fix julia lu algorithm to handle singular matrices similarly to LAPACK.
Merge pull request #6064 from JuliaLang/anj/lu

Fix julia lu algorithm to handle singular matrices similarly to LAPACK.