Use `_sharded_cpu_state_dict` functionality to Write Items for SPMD Save Planner (#5315)
* initial commit
* add suggested changes
* add unit test
* fix test
* fix test
* add suggested changes
* remove is_sharded_tensor check
* check if device type is xla in `wrap_if_sharded`
* change order
* update resolve_data and add more tests
* run linter
* use subtest
* formatting fixes
* run linter