[FSDP2] Zeroed padded tensor in `_apply` (#121509)
This PR replaces the `Tensor.resize_` with an explicit zero-ing of the padded tensor. Uninitialized padding is not good since it can give false positive NaNs.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/121509
Approved by: https://github.com/Skylion007, https://github.com/wanchaol