[export] cleanup to rewrite steps (#121037)
1. Some underscores for consistency of private functions.
2. remove dead code in `_replace_param_buffer_names`
Differential Revision: [D54429206](https://our.internmc.facebook.com/intern/diff/D54429206/)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/121037
Approved by: https://github.com/angelayi, https://github.com/zhxchen17