[FSDP][2/n] add use_dtensor flag to both StateDictConfig and OptimStateDictConfig (#103477)
Same as #102552 (this branch is corrupted so have to re-submit).
Pull Request resolved: https://github.com/pytorch/pytorch/pull/103477
Approved by: https://github.com/fegin