REFACTOR Backported changes in _solve_cholesky_kernel to ridge.py