Preserve method parameter names (#16750)
Summary:
Fixes #16591
This uses uniqueBaseName so that parameters do not end up with suffixes. It changes next_id to be per-base-name rather than global to fix jittering issues when re-importing a re-numbered graph.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/16750
Differential Revision: D13960282
Pulled By: zdevito
fbshipit-source-id: 2156f581d9b95d77bf1f1252074e800b19116555