[JIT] Refactor attributes to support buffers and parameters as first class citizens, add support for iterating over `named_buffers()` (#37905)
Summary:
First part of https://github.com/pytorch/pytorch/issues/36211 - still a WIP, but asking for commentary to ensure this is the direction we want to go in.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/37905
Differential Revision: D21633735
Pulled By: voznesenskym
fbshipit-source-id: f4e4302e40114513776c9e48867a90d72049e2e9