[JIT] Adds a `code_with_constants` method to module printing (#37586)
Summary:
Closes https://github.com/pytorch/pytorch/issues/36625
Pull Request resolved: https://github.com/pytorch/pytorch/pull/37586
Differential Revision: D21331385
Pulled By: suo
fbshipit-source-id: 752e63eac8bdd06c6719efb972cdc832ad7c1535