[JIT] Fix `@staticmethod` access from `self` on modules (#37702)
Summary:
Closes https://github.com/pytorch/pytorch/issues/30755
Pull Request resolved: https://github.com/pytorch/pytorch/pull/37702
Differential Revision: D21389989
Pulled By: voznesenskym
fbshipit-source-id: f9b7e26a9eab7dc3d7762a5a28f85424dac5fbb3