Logdet of a cholesky! factorized matrix trows a `DomainError`

cholesky! modifies the matrix in place and returns a very thin wrapper excluding the ignored data. The original binding still has that data though:

julia> using LinearAlgebra

julia> mat = [2.4 2.05
              2.05 2.4]
2×2 Array{Float64,2}:
 2.4   2.05
 2.05  2.4

julia> a = cholesky!(mat)
Cholesky{Float64,Array{Float64,2}}
U factor:
2×2 UpperTriangular{Float64,Array{Float64,2}}:
 1.54919  1.32327
  ⋅       0.80558

julia> logdet(a)
0.4430819716794719

julia> mat
2×2 Array{Float64,2}:
 1.54919  1.32327
 2.05     0.80558

Since cholesky! might be called with very large matrices, preserving the existing memory is vital for good performance. Dispatch takes it from there and efficiently works with the wrapper instead of the underlying data.