[DCP][state_dict] Fix the issue that get_state_dict/set_state_dict ignore the buffer (#119573)
get_state_dict and set_state_dict currently do not appropriately handle the
buffers. This PR fixes thie issue.
Fixes, https://github.com/pytorch/pytorch/issues/119535.
Differential Revision: [D53616762](https://our.internmc.facebook.com/intern/diff/D53616762/)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/119573
Approved by: https://github.com/wz337, https://github.com/LucasLLC