`linalg_ldl_solve`: change to new `MetaBase` API.
This PR modifies `linalg_ldl_solve` to the new `MetaBase` API. Instead of checking the
output strides manually, it now uses the appropriate `set_output_strided` and
`set_output_contiguous`.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/78039
Approved by: https://github.com/Lezcano, https://github.com/ezyang