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